svn commit: r193153 - head/sys/i386/xen
Author: adrian Date: Sun May 31 07:25:24 2009 New Revision: 193153 URL: http://svn.freebsd.org/changeset/base/193153 Log: Remove some unused code in ipi_selected() . The code path this was copied from (sys/i386/i386/mp_machdep.c:ipi_selected()) handles bitmap'ed IPIs and normal IPIs via separate notification paths. Xen SMP handles them the same way. Modified: head/sys/i386/xen/mp_machdep.c Modified: head/sys/i386/xen/mp_machdep.c == --- head/sys/i386/xen/mp_machdep.c Sun May 31 06:58:35 2009 (r193152) +++ head/sys/i386/xen/mp_machdep.c Sun May 31 07:25:24 2009 (r193153) @@ -1146,11 +1146,6 @@ ipi_selected(cpumask_t cpus, u_int ipi) void ipi_all_but_self(u_int ipi) { - - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { - ipi_selected(PCPU_GET(other_cpus), ipi); - return; - } CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); ipi_selected(PCPU_GET(other_cpus), ipi); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193154 - in head/sys/i386: include xen
Author: adrian Date: Sun May 31 08:11:39 2009 New Revision: 193154 URL: http://svn.freebsd.org/changeset/base/193154 Log: Fix the MP IPI code to differentiate between bitmapped IPIs and function IPIs. This attempts to fix the IPI handling code to correctly differentiate between bitmapped IPIs and function IPIs. The Xen IPIs were on low numbers which clashed with the bitmapped IPIs. This commit bumps those IPI numbers up to 240 and above (just like in the i386 code) and fiddles with the ipi_vectors[] logic to call the correct function. This still isn't "right". Specifically, the IPI code may work fine for TLB shootdown events but the rendezvous/lazypmap IPIs are thrown by calling ipi_*() routines which don't set the call_func stuff (function id, addr1, addr2) that the TLB shootdown events are. So the Xen SMP support is still broken. PR: 135069 Modified: head/sys/i386/include/apicvar.h head/sys/i386/xen/mp_machdep.c Modified: head/sys/i386/include/apicvar.h == --- head/sys/i386/include/apicvar.h Sun May 31 07:25:24 2009 (r193153) +++ head/sys/i386/include/apicvar.h Sun May 31 08:11:39 2009 (r193154) @@ -114,14 +114,14 @@ #defineAPIC_IPI_INTS (APIC_LOCAL_INTS + 2) #ifdef XEN -#defineIPI_RENDEZVOUS (2) /* Inter-CPU rendezvous. */ -#defineIPI_INVLTLB (3) /* TLB Shootdown IPIs */ -#defineIPI_INVLPG (4) -#defineIPI_INVLRNG (5) -#defineIPI_INVLCACHE (6) -#defineIPI_LAZYPMAP(7) /* Lazy pmap release. */ +#defineIPI_RENDEZVOUS (APIC_IPI_INTS) /* Inter-CPU rendezvous. */ +#defineIPI_INVLTLB (APIC_IPI_INTS + 1) /* TLB Shootdown IPIs */ +#defineIPI_INVLPG (APIC_IPI_INTS + 2) +#defineIPI_INVLRNG (APIC_IPI_INTS + 3) +#defineIPI_INVLCACHE (APIC_IPI_INTS + 4) +#defineIPI_LAZYPMAP(APIC_IPI_INTS + 5) /* Lazy pmap release. */ /* Vector to handle bitmap based IPIs */ -#defineIPI_BITMAP_VECTOR (8) +#defineIPI_BITMAP_VECTOR (APIC_IPI_INTS + 6) #else #defineIPI_RENDEZVOUS (APIC_IPI_INTS) /* Inter-CPU rendezvous. */ Modified: head/sys/i386/xen/mp_machdep.c == --- head/sys/i386/xen/mp_machdep.c Sun May 31 07:25:24 2009 (r193153) +++ head/sys/i386/xen/mp_machdep.c Sun May 31 08:11:39 2009 (r193154) @@ -350,17 +350,11 @@ iv_lazypmap(uintptr_t a, uintptr_t b) atomic_add_int(&smp_tlb_wait, 1); } - -static void -iv_noop(uintptr_t a, uintptr_t b) -{ - atomic_add_int(&smp_tlb_wait, 1); -} - -static call_data_func_t *ipi_vectors[IPI_BITMAP_VECTOR] = +/* + * These start from "IPI offset" APIC_IPI_INTS + */ +static call_data_func_t *ipi_vectors[6] = { - iv_noop, - iv_noop, iv_rendezvous, iv_invltlb, iv_invlpg, @@ -419,10 +413,11 @@ smp_call_function_interrupt(void *unused atomic_t *started = &call_data->started; atomic_t *finished = &call_data->finished; - if (call_data->func_id > IPI_BITMAP_VECTOR) + /* We only handle function IPIs, not bitmap IPIs */ + if (call_data->func_id < APIC_IPI_INTS || call_data->func_id > IPI_BITMAP_VECTOR) panic("invalid function id %u", call_data->func_id); - func = ipi_vectors[call_data->func_id]; + func = ipi_vectors[call_data->func_id - APIC_IPI_INTS]; /* * Notify initiating CPU that I've grabbed the data and am * about to execute the function ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193155 - in head/sys: kern sys
Author: nwhitehorn Date: Sun May 31 08:59:15 2009 New Revision: 193155 URL: http://svn.freebsd.org/changeset/base/193155 Log: Provide a new CPU device driver ivar to report the nominal speed of the CPU, if available. This is meant to solve the issue of cpufreq misreporting speeds on CPUs that boot in a reduced power mode and have only relative speed control. Modified: head/sys/kern/kern_cpu.c head/sys/sys/cpu.h Modified: head/sys/kern/kern_cpu.c == --- head/sys/kern/kern_cpu.cSun May 31 08:11:39 2009(r193154) +++ head/sys/kern/kern_cpu.cSun May 31 08:59:15 2009(r193155) @@ -158,12 +158,16 @@ cpufreq_attach(device_t dev) CF_MTX_INIT(&sc->lock); sc->curr_level.total_set.freq = CPUFREQ_VAL_UNKNOWN; SLIST_INIT(&sc->saved_freq); - /* Try to get current CPU freq to use it as maximum later if needed */ - pc = cpu_get_pcpu(dev); - if (cpu_est_clockrate(pc->pc_cpuid, &rate) == 0) - sc->max_mhz = rate / 100; - else - sc->max_mhz = CPUFREQ_VAL_UNKNOWN; + /* Try to get nominal CPU freq to use it as maximum later if needed */ + sc->max_mhz = cpu_get_nominal_mhz(dev); + /* If that fails, try to measure the current rate */ + if (sc->max_mhz <= 0) { + pc = cpu_get_pcpu(dev); + if (cpu_est_clockrate(pc->pc_cpuid, &rate) == 0) + sc->max_mhz = rate / 100; + else + sc->max_mhz = CPUFREQ_VAL_UNKNOWN; + } /* * Only initialize one set of sysctls for all CPUs. In the future, @@ -581,15 +585,20 @@ cf_levels_method(device_t dev, struct cf /* * If there are no absolute levels, create a fake one at 100%. We * then cache the clockrate for later use as our base frequency. -* -* XXX This assumes that the first time through, if we only have -* relative drivers, the CPU is currently running at 100%. */ if (TAILQ_EMPTY(&sc->all_levels)) { if (sc->max_mhz == CPUFREQ_VAL_UNKNOWN) { - pc = cpu_get_pcpu(dev); - cpu_est_clockrate(pc->pc_cpuid, &rate); - sc->max_mhz = rate / 100; + sc->max_mhz = cpu_get_nominal_mhz(dev); + /* +* If the CPU can't report a rate for 100%, hope +* the CPU is running at its nominal rate right now, +* and use that instead. +*/ + if (sc->max_mhz <= 0) { + pc = cpu_get_pcpu(dev); + cpu_est_clockrate(pc->pc_cpuid, &rate); + sc->max_mhz = rate / 100; + } } memset(&sets[0], CPUFREQ_VAL_UNKNOWN, sizeof(*sets)); sets[0].freq = sc->max_mhz; Modified: head/sys/sys/cpu.h == --- head/sys/sys/cpu.h Sun May 31 08:11:39 2009(r193154) +++ head/sys/sys/cpu.h Sun May 31 08:59:15 2009(r193155) @@ -36,6 +36,7 @@ */ #define CPU_IVAR_PCPU 1 +#define CPU_IVAR_NOMINAL_MHZ 2 static __inline struct pcpu *cpu_get_pcpu(device_t dev) { @@ -44,6 +45,15 @@ static __inline struct pcpu *cpu_get_pcp return ((struct pcpu *)v); } +static __inline int32_t cpu_get_nominal_mhz(device_t dev) +{ + uintptr_t v = 0; + if (BUS_READ_IVAR(device_get_parent(dev), dev, + CPU_IVAR_NOMINAL_MHZ, &v) != 0) + return (-1); + return ((int32_t)v); +} + /* * CPU frequency control interface. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193156 - in head/sys: conf modules modules/cpufreq powerpc/aim powerpc/booke powerpc/conf powerpc/cpufreq powerpc/ofw powerpc/powermac powerpc/powerpc
Author: nwhitehorn Date: Sun May 31 09:01:23 2009 New Revision: 193156 URL: http://svn.freebsd.org/changeset/base/193156 Log: Introduce support for cpufreq on PowerPC with the dynamic frequency switching capabilities of the MPC7447A and MPC7448. Added: head/sys/powerpc/cpufreq/ head/sys/powerpc/cpufreq/dfs.c (contents, props changed) head/sys/powerpc/ofw/ofw_cpu.c (contents, props changed) head/sys/powerpc/powermac/vcoregpio.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/modules/Makefile head/sys/modules/cpufreq/Makefile head/sys/powerpc/aim/machdep.c head/sys/powerpc/booke/machdep.c head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/NOTES head/sys/powerpc/powerpc/cpu.c Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Sun May 31 08:59:15 2009(r193155) +++ head/sys/conf/files.powerpc Sun May 31 09:01:23 2009(r193156) @@ -97,6 +97,7 @@ powerpc/booke/pmap.c optionale500 powerpc/booke/swtch.S optionale500 powerpc/booke/trap.c optionale500 powerpc/booke/vm_machdep.c optionale500 +powerpc/cpufreq/dfs.c optionalcpufreq powerpc/fpu/fpu_add.c optionalfpu_emu powerpc/fpu/fpu_compare.c optionalfpu_emu powerpc/fpu/fpu_div.c optionalfpu_emu @@ -114,6 +115,7 @@ powerpc/mpc85xx/nexus.c optionalmpc85x powerpc/mpc85xx/ocpbus.c optionalmpc85xx powerpc/mpc85xx/opic.c optionalmpc85xx powerpc/mpc85xx/pci_ocp.c optionalpci mpc85xx +powerpc/ofw/ofw_cpu.c optionalaim powerpc/ofw/ofw_pcibus.c optionalpci aim powerpc/ofw/ofw_pcib_pci.c optionalpci aim powerpc/ofw/ofw_real.c optionalaim @@ -133,6 +135,7 @@ powerpc/powermac/cuda.c optionalpowerm powerpc/powermac/pmu.c optionalpowermac pmu powerpc/powermac/macgpio.c optionalpowermac pci powerpc/powermac/cpcht.c optionalpowermac pci +powerpc/powermac/vcoregpio.c optionalpowermac powerpc/powerpc/altivec.c optionalaim powerpc/powerpc/atomic.S standard powerpc/powerpc/autoconf.c standard Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Sun May 31 08:59:15 2009(r193155) +++ head/sys/modules/Makefile Sun May 31 09:01:23 2009(r193156) @@ -576,6 +576,7 @@ _xe=xe .if ${MACHINE_ARCH} == "powerpc" _an= an _bm= bm +_cpufreq= cpufreq _nvram=powermac_nvram _smbfs=smbfs _sound=sound Modified: head/sys/modules/cpufreq/Makefile == --- head/sys/modules/cpufreq/Makefile Sun May 31 08:59:15 2009 (r193155) +++ head/sys/modules/cpufreq/Makefile Sun May 31 09:01:23 2009 (r193156) @@ -19,4 +19,9 @@ SRCS+=est.c hwpstate.c p4tcc.c powernow SRCS+= smist.c .endif +.if ${MACHINE} == "powerpc" +.PATH: ${.CURDIR}/../../powerpc/cpufreq +SRCS+= dfs.c +.endif + .include Modified: head/sys/powerpc/aim/machdep.c == --- head/sys/powerpc/aim/machdep.c Sun May 31 08:59:15 2009 (r193155) +++ head/sys/powerpc/aim/machdep.c Sun May 31 09:01:23 2009 (r193156) @@ -881,14 +881,6 @@ cpu_initclocks(void) decr_tc_init(); } -/* Get current clock frequency for the given cpu id. */ -int -cpu_est_clockrate(int cpu_id, uint64_t *rate) -{ - - return (ENXIO); -} - /* * Shutdown the CPU as much as possible. */ Modified: head/sys/powerpc/booke/machdep.c == --- head/sys/powerpc/booke/machdep.cSun May 31 08:59:15 2009 (r193155) +++ head/sys/powerpc/booke/machdep.cSun May 31 09:01:23 2009 (r193156) @@ -587,14 +587,6 @@ cpu_flush_dcache(void *ptr, size_t len) /* TBD */ } -/* Get current clock frequency for the given cpu id. */ -int -cpu_est_clockrate(int cpu_id, uint64_t *rate) -{ - - return (ENXIO); -} - /* * Construct a PCB from a trapframe. This is called from kdb_trap() where * we want to start a backtrace from the function that caused us to enter Modified: head/sys/powerpc/conf/GENERIC == --- head/sys/powerpc/conf/GENERIC Sun May 31 08:59:15 2009 (r193155) +++ head/sys/powerpc/conf/GENERIC Sun May 31 09:01:23 2009 (r193156) @@ -76,6 +76,9 @@ options WITNESS_SKIPSPIN#Don't run wit # To make an SMP kernel, the next line is nee
svn commit: r193157 - head/share/man/man4
Author: rwatson Date: Sun May 31 09:03:14 2009 New Revision: 193157 URL: http://svn.freebsd.org/changeset/base/193157 Log: Upgrade audit(4) from experimental to production status for FreeBSD 8.0. While there remain some incomplete aspects of the implementation (such as incomplete auditing of some system calls), the implementation has been burned in for a few years, as well as in GENERIC for a few years. Obtained from:TrustedBSD Project Modified: head/share/man/man4/audit.4 Modified: head/share/man/man4/audit.4 == --- head/share/man/man4/audit.4 Sun May 31 09:01:23 2009(r193156) +++ head/share/man/man4/audit.4 Sun May 31 09:03:14 2009(r193157) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 5, 2006 +.Dd May 31, 2009 .Os .Dt AUDIT 4 .Sh NAME @@ -125,13 +125,6 @@ This manual page was written by .An Robert Watson Aq rwat...@freebsd.org . .Sh BUGS The -.Nm -facility in -.Fx -is considered experimental, and production deployment should occur only after -careful consideration of the risks of deploying experimental software. -.Pp -The .Fx kernel does not fully validate that audit records submitted by user applications are syntactically valid BSM; as submission of records is limited ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193156 - in head/sys: conf modules modules/cpufreq powerpc/aim powerpc/booke powerpc/conf powerpc/cpufreq powerpc/ofw powerpc/powermac powerpc/powerpc
Nathan Whitehorn wrote: Author: nwhitehorn Date: Sun May 31 09:01:23 2009 New Revision: 193156 URL: http://svn.freebsd.org/changeset/base/193156 Log: Introduce support for cpufreq on PowerPC with the dynamic frequency switching capabilities of the MPC7447A and MPC7448. Based on code by: Andreas Tobler -Nathan ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193159 - head/sys/powerpc/powermac
Author: nwhitehorn Date: Sun May 31 10:02:20 2009 New Revision: 193159 URL: http://svn.freebsd.org/changeset/base/193159 Log: Provide an analogous sysctl to hw.acpi.acline (dev.pmu.0.acline) to determine whether the computer is plugged in to mains power. Modified: head/sys/powerpc/powermac/pmu.c Modified: head/sys/powerpc/powermac/pmu.c == --- head/sys/powerpc/powermac/pmu.c Sun May 31 09:22:26 2009 (r193158) +++ head/sys/powerpc/powermac/pmu.c Sun May 31 10:02:20 2009 (r193159) @@ -72,6 +72,7 @@ static void pmu_poll(device_t dev); static voidpmu_set_sleepled(void *xsc, int onoff); static int pmu_server_mode(SYSCTL_HANDLER_ARGS); +static int pmu_acline_state(SYSCTL_HANDLER_ARGS); static int pmu_query_battery(struct pmu_softc *sc, int batt, struct pmu_battstate *info); static int pmu_battquery_sysctl(SYSCTL_HANDLER_ARGS); @@ -393,6 +394,10 @@ pmu_attach(device_t dev) struct sysctl_oid *oid, *battroot; char battnum[2]; + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "acline", CTLTYPE_INT | CTLFLAG_RD, sc, 0, + pmu_acline_state, "I", "AC Line Status"); + battroot = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "batteries", CTLFLAG_RD, 0, "Battery Information"); @@ -843,6 +848,27 @@ pmu_query_battery(struct pmu_softc *sc, } static int +pmu_acline_state(SYSCTL_HANDLER_ARGS) +{ + struct pmu_softc *sc; + struct pmu_battstate batt; + int error, result; + + sc = arg1; + + /* The PMU treats the AC line status as a property of the battery */ + error = pmu_query_battery(sc, 0, &batt); + + if (error != 0) + return (error); + + result = (batt.state & PMU_PWR_AC_PRESENT) ? 1 : 0; + error = sysctl_handle_int(oidp, &result, 0, req); + + return (error); +} + +static int pmu_battquery_sysctl(SYSCTL_HANDLER_ARGS) { struct pmu_softc *sc; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193161 - head/usr.sbin/powerd
Author: nwhitehorn Date: Sun May 31 10:27:24 2009 New Revision: 193161 URL: http://svn.freebsd.org/changeset/base/193161 Log: Teach powerd how to query the PMU AC line state on PowerPC. Modified: head/usr.sbin/powerd/powerd.c Modified: head/usr.sbin/powerd/powerd.c == --- head/usr.sbin/powerd/powerd.c Sun May 31 10:13:10 2009 (r193160) +++ head/usr.sbin/powerd/powerd.c Sun May 31 10:27:24 2009 (r193161) @@ -74,6 +74,7 @@ const char *modes[] = { }; #define ACPIAC "hw.acpi.acline" +#define PMUAC "dev.pmu.0.acline" #define APMDEV "/dev/apm" #define DEVDPIPE "/var/run/devd.pipe" #define DEVCTL_MAXBUF 1024 @@ -93,7 +94,8 @@ static void usage(void); static int cp_times_mib[2]; static int freq_mib[4]; static int levels_mib[4]; -static int acline_mib[3]; +static int acline_mib[4]; +static size_t acline_mib_len; /* Configuration */ static int cpu_running_mark; @@ -105,7 +107,7 @@ static volatile sig_atomic_t exit_reques static power_src_t acline_status; static enum { ac_none, - ac_acpi_sysctl, + ac_sysctl, ac_acpi_devd, #ifdef USE_APM ac_apm, @@ -259,13 +261,18 @@ get_freq_id(int freq, int *freqs, int nu static void acline_init() { - size_t len; + acline_mib_len = 4; - len = 3; - if (sysctlnametomib(ACPIAC, acline_mib, &len) == 0) { - acline_mode = ac_acpi_sysctl; + if (sysctlnametomib(ACPIAC, acline_mib, &acline_mib_len) == 0) { + acline_mode = ac_sysctl; + if (vflag) + warnx("using sysctl for AC line status"); +#if __powerpc__ + } else if (sysctlnametomib(PMUAC, acline_mib, &acline_mib_len) == 0) { + acline_mode = ac_sysctl; if (vflag) warnx("using sysctl for AC line status"); +#endif #ifdef USE_APM } else if ((apm_fd = open(APMDEV, O_RDONLY)) >= 0) { if (vflag) @@ -291,7 +298,7 @@ acline_read(void) if (vflag) warnx("lost devd connection, switching to sysctl"); devd_close(); - acline_mode = ac_acpi_sysctl; + acline_mode = ac_sysctl; /* FALLTHROUGH */ } if (rlen > 0 && @@ -301,12 +308,13 @@ acline_read(void) sscanf(ptr, "notify=%x", ¬ify) == 1) acline_status = (notify ? SRC_AC : SRC_BATTERY); } - if (acline_mode == ac_acpi_sysctl) { + if (acline_mode == ac_sysctl) { int acline; size_t len; len = sizeof(acline); - if (sysctl(acline_mib, 3, &acline, &len, NULL, 0) == 0) + if (sysctl(acline_mib, acline_mib_len, &acline, &len, + NULL, 0) == 0) acline_status = (acline ? SRC_AC : SRC_BATTERY); else acline_status = SRC_UNKNOWN; @@ -326,7 +334,7 @@ acline_read(void) } #endif /* try to (re)connect to devd */ - if (acline_mode == ac_acpi_sysctl) { + if (acline_mode == ac_sysctl) { struct timeval now; gettimeofday(&now, NULL); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193112 - head/etc/rc.d
Doug, On Sat, 30 May 2009, Doug Barton wrote: DB> Author: dougb DB> Date: Sat May 30 19:38:51 2009 DB> New Revision: 193112 DB> URL: http://svn.freebsd.org/changeset/base/193112 DB> DB> Log: DB> As previously advertised, remove this script prior to the 8.0 branch. Was there an agreement what should one do with dumping to gmirror (see sbin/geom/class/mirror/gmirror.8) ? -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: ma...@freebsd.org ] *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru *** ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193162 - in head/sys/fs: nfsclient nfsserver
Author: zec Date: Sun May 31 11:57:51 2009 New Revision: 193162 URL: http://svn.freebsd.org/changeset/base/193162 Log: Unbreak options VIMAGE kernel builds. Approved by: julian (mentor) Modified: head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c == --- head/sys/fs/nfsclient/nfs_clvnops.c Sun May 31 10:27:24 2009 (r193161) +++ head/sys/fs/nfsclient/nfs_clvnops.c Sun May 31 11:57:51 2009 (r193162) @@ -1374,7 +1374,7 @@ again: } mtx_unlock(&dnp->n_mtx); - CURVNET_SET(nmp->nm_sockreq.nr_so->so_vnet); + CURVNET_SET(P_TO_VNET(&proc0)); #ifdef INET INIT_VNET_INET(curvnet); if (!TAILQ_EMPTY(&V_in_ifaddrhead)) Modified: head/sys/fs/nfsserver/nfs_nfsdport.c == --- head/sys/fs/nfsserver/nfs_nfsdport.cSun May 31 10:27:24 2009 (r193161) +++ head/sys/fs/nfsserver/nfs_nfsdport.cSun May 31 11:57:51 2009 (r193162) @@ -2673,6 +2673,7 @@ nfsrv_v4rootexport(void *argp, struct uc int nfsrv_getsocksndseq(struct socket *so, tcp_seq *maxp, tcp_seq *unap) { + INIT_VNET_INET(so->so_vnet); struct inpcb *inp; struct tcpcb *tp; int error = EPIPE; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193163 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: dfr Date: Sun May 31 11:59:32 2009 New Revision: 193163 URL: http://svn.freebsd.org/changeset/base/193163 Log: Allow the bootfs property to be set for raidz pools on FreeBSD. Reviewed by: pjd Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun May 31 11:57:51 2009(r193162) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sun May 31 11:59:32 2009(r193163) @@ -2392,13 +2392,23 @@ vdev_set_state(vdev_t *vd, boolean_t iso /* * Check the vdev configuration to ensure that it's capable of supporting - * a root pool. Currently, we do not support RAID-Z or partial configuration. - * In addition, only a single top-level vdev is allowed and none of the leaves - * can be wholedisks. + * a root pool. + * + * On Solaris, we do not support RAID-Z or partial configuration. In + * addition, only a single top-level vdev is allowed and none of the + * leaves can be wholedisks. + * + * For FreeBSD, we can boot from any configuration. There is a + * limitation that the boot filesystem must be either uncompressed or + * compresses with lzjb compression but I'm not sure how to enforce + * that here. */ boolean_t vdev_is_bootable(vdev_t *vd) { +#ifdef __FreeBSD_version + return (B_TRUE); +#else int c; if (!vd->vdev_ops->vdev_op_leaf) { @@ -2420,4 +2430,5 @@ vdev_is_bootable(vdev_t *vd) return (B_FALSE); } return (B_TRUE); +#endif } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193164 - head/sys/compat/linux
Author: dchagin Date: Sun May 31 12:00:16 2009 New Revision: 193164 URL: http://svn.freebsd.org/changeset/base/193164 Log: Remove empty lines. Approved by: kib (mentor) MFC after:1 month Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c == --- head/sys/compat/linux/linux_socket.cSun May 31 11:59:32 2009 (r193163) +++ head/sys/compat/linux/linux_socket.cSun May 31 12:00:16 2009 (r193164) @@ -445,8 +445,6 @@ bsd_to_linux_cmsg_type(int cmsg_type) return (-1); } - - static int linux_to_bsd_msghdr(struct msghdr *bhdr, const struct l_msghdr *lhdr) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193165 - head/sys/compat/linux
Author: dchagin Date: Sun May 31 12:04:01 2009 New Revision: 193165 URL: http://svn.freebsd.org/changeset/base/193165 Log: Move new socket flags handling into a separate function as Linux introduced more syscalls which uses these flags. Approved by: kib (mentor) MFC after:1 month Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c == --- head/sys/compat/linux/linux_socket.cSun May 31 12:00:16 2009 (r193164) +++ head/sys/compat/linux/linux_socket.cSun May 31 12:04:01 2009 (r193165) @@ -475,6 +475,24 @@ bsd_to_linux_msghdr(const struct msghdr } static int +linux_set_socket_flags(struct thread *td, int s, int flags) +{ + int error; + + if (flags & LINUX_SOCK_NONBLOCK) { + error = kern_fcntl(td, s, F_SETFL, O_NONBLOCK); + if (error) + return (error); + } + if (flags & LINUX_SOCK_CLOEXEC) { + error = kern_fcntl(td, s, F_SETFD, FD_CLOEXEC); + if (error) + return (error); + } + return (0); +} + +static int linux_sendit(struct thread *td, int s, struct msghdr *mp, int flags, struct mbuf *control, enum uio_seg segflg) { @@ -608,21 +626,11 @@ linux_socket(struct thread *td, struct l if (retval_socket) return (retval_socket); - if (socket_flags & LINUX_SOCK_NONBLOCK) { - retval_socket = kern_fcntl(td, td->td_retval[0], - F_SETFL, O_NONBLOCK); - if (retval_socket) { - (void)kern_close(td, td->td_retval[0]); - goto out; - } - } - if (socket_flags & LINUX_SOCK_CLOEXEC) { - retval_socket = kern_fcntl(td, td->td_retval[0], - F_SETFD, FD_CLOEXEC); - if (retval_socket) { - (void)kern_close(td, td->td_retval[0]); - goto out; - } + retval_socket = linux_set_socket_flags(td, td->td_retval[0], + socket_flags); + if (retval_socket) { + (void)kern_close(td, td->td_retval[0]); + goto out; } if (bsd_args.type == SOCK_RAW ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193166 - in head/sys: kern net sys
Author: zec Date: Sun May 31 12:10:04 2009 New Revision: 193166 URL: http://svn.freebsd.org/changeset/base/193166 Log: Introduce an interm userland-kernel API for creating vnets and assigning ifnets from one vnet to another. Deletion of vnets is not yet supported. The interface is implemented as an ioctl extension so that no syscalls had to be introduced. This should be acceptable given that the new interface will be used for a short / interim period only, until the new jail management framwork gains the capability of managing vnets. This method for managing vimages / vnets has been in use for the past 7 years without any observable issues. The userland tool to be used in conjunction with the interim API can be found in p4: //depot/projects/vimage-commit2/src/usr.sbin/vimage/... and will most probably never get commited to svn. While here, bump copyright notices in kern_vimage.c and vimage.h to cover work done in year 2009. Approved by: julian (mentor) Discussed with: bz, rwatson Modified: head/sys/kern/kern_prot.c head/sys/kern/kern_vimage.c head/sys/net/if.c head/sys/sys/sockio.h head/sys/sys/vimage.h Modified: head/sys/kern/kern_prot.c == --- head/sys/kern/kern_prot.c Sun May 31 12:04:01 2009(r193165) +++ head/sys/kern/kern_prot.c Sun May 31 12:10:04 2009(r193166) @@ -1748,7 +1748,11 @@ p_canwait(struct thread *td, struct proc KASSERT(td == curthread, ("%s: td not curthread", __func__)); PROC_LOCK_ASSERT(p, MA_OWNED); - if ((error = prison_check(td->td_ucred, p->p_ucred))) + if ( +#ifdef VIMAGE /* XXX temporary until struct vimage goes away */ + !vi_child_of(TD_TO_VIMAGE(td), P_TO_VIMAGE(p)) && +#endif + (error = prison_check(td->td_ucred, p->p_ucred))) return (error); #ifdef MAC if ((error = mac_proc_check_wait(td->td_ucred, p))) Modified: head/sys/kern/kern_vimage.c == --- head/sys/kern/kern_vimage.c Sun May 31 12:04:01 2009(r193165) +++ head/sys/kern/kern_vimage.c Sun May 31 12:10:04 2009(r193166) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 2004-2008 University of Zagreb - * Copyright (c) 2006-2008 FreeBSD Foundation + * Copyright (c) 2004-2009 University of Zagreb + * Copyright (c) 2006-2009 FreeBSD Foundation * * This software was developed by the University of Zagreb and the * FreeBSD Foundation under sponsorship by the Stichting NLnet and the @@ -34,16 +34,24 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" #include -#include #include #include +#include #include -#include +#include +#include +#include +#include +#include #include #ifdef DDB #include #endif +#include +#include +#include + #ifndef VIMAGE_GLOBALS MALLOC_DEFINE(M_VIMAGE, "vimage", "vimage resource container"); @@ -57,6 +65,22 @@ static int vnet_mod_constructor(struct v static int vnet_mod_destructor(struct vnet_modlink *); #ifdef VIMAGE +static struct vimage *vimage_by_name(struct vimage *, char *); +static struct vimage *vi_alloc(struct vimage *, char *); +static struct vimage *vimage_get_next(struct vimage *, struct vimage *, int); +static void vimage_relative_name(struct vimage *, struct vimage *, +char *, int); +#endif + +#defineVNET_LIST_WLOCK() \ + mtx_lock(&vnet_list_refc_mtx); \ + while (vnet_list_refc != 0) \ + cv_wait(&vnet_list_condvar, &vnet_list_refc_mtx); + +#defineVNET_LIST_WUNLOCK() \ + mtx_unlock(&vnet_list_refc_mtx); + +#ifdef VIMAGE struct vimage_list_head vimage_head; struct vnet_list_head vnet_head; struct vprocg_list_head vprocg_head; @@ -67,9 +91,294 @@ struct vprocg vprocg_0; #endif #ifdef VIMAGE +struct cv vnet_list_condvar; +struct mtx vnet_list_refc_mtx; +int vnet_list_refc = 0; + +static u_int last_vi_id = 0; +static u_int last_vnet_id = 0; +static u_int last_vprocg_id = 0; + struct vnet *vnet0; #endif +#ifdef VIMAGE + +/* + * Interim userspace interface - will be replaced by jail soon. + */ + +/* + * Move an ifnet to another vnet. The ifnet can be specified either + * by ifp argument, or by name contained in vi_req->vi_if_xname if NULL is + * passed as ifp. The target vnet can be specified either by vnet + * argument or by name. If vnet name equals to ".." or vi_req is set to + * NULL the interface is moved to the parent vnet. + */ +int +vi_if_move(struct vi_req *vi_req, struct ifnet *ifp, struct vimage *vip) +{ + struct vimage *new_vip; + struct vnet *new_vnet = NULL; + + /* Check for API / ABI version mismatch. */ + if (vi_req->vi_api_cookie != VI_API_COOKIE) + return (EDOOFUS); + +
svn commit: r193167 - in head/sys: kern sys
Author: dchagin Date: Sun May 31 12:12:38 2009 New Revision: 193167 URL: http://svn.freebsd.org/changeset/base/193167 Log: Split native socketpair() syscall onto kern_socketpair() which should be used by kernel consumers and socketpair() itself. Approved by: kib (mentor) MFC after:1 month Modified: head/sys/kern/uipc_syscalls.c head/sys/sys/syscallsubr.h Modified: head/sys/kern/uipc_syscalls.c == --- head/sys/kern/uipc_syscalls.c Sun May 31 12:10:04 2009 (r193166) +++ head/sys/kern/uipc_syscalls.c Sun May 31 12:12:38 2009 (r193167) @@ -588,51 +588,43 @@ done1: } int -socketpair(td, uap) - struct thread *td; - struct socketpair_args /* { - int domain; - int type; - int protocol; - int *rsv; - } */ *uap; +kern_socketpair(struct thread *td, int domain, int type, int protocol, +int *rsv) { struct filedesc *fdp = td->td_proc->p_fd; struct file *fp1, *fp2; struct socket *so1, *so2; - int fd, error, sv[2]; + int fd, error; #ifdef MAC /* We might want to have a separate check for socket pairs. */ - error = mac_socket_check_create(td->td_ucred, uap->domain, uap->type, - uap->protocol); + error = mac_socket_check_create(td->td_ucred, domain, type, + protocol); if (error) return (error); #endif - error = socreate(uap->domain, &so1, uap->type, uap->protocol, - td->td_ucred, td); + error = socreate(domain, &so1, type, protocol, td->td_ucred, td); if (error) return (error); - error = socreate(uap->domain, &so2, uap->type, uap->protocol, - td->td_ucred, td); + error = socreate(domain, &so2, type, protocol, td->td_ucred, td); if (error) goto free1; /* On success extra reference to `fp1' and 'fp2' is set by falloc. */ error = falloc(td, &fp1, &fd); if (error) goto free2; - sv[0] = fd; + rsv[0] = fd; fp1->f_data = so1; /* so1 already has ref count */ error = falloc(td, &fp2, &fd); if (error) goto free3; fp2->f_data = so2; /* so2 already has ref count */ - sv[1] = fd; + rsv[1] = fd; error = soconnect2(so1, so2); if (error) goto free4; - if (uap->type == SOCK_DGRAM) { + if (type == SOCK_DGRAM) { /* * Datagram socket connection is asymmetric. */ @@ -642,18 +634,14 @@ socketpair(td, uap) } finit(fp1, FREAD | FWRITE, DTYPE_SOCKET, fp1->f_data, &socketops); finit(fp2, FREAD | FWRITE, DTYPE_SOCKET, fp2->f_data, &socketops); - so1 = so2 = NULL; - error = copyout(sv, uap->rsv, 2 * sizeof (int)); - if (error) - goto free4; fdrop(fp1, td); fdrop(fp2, td); return (0); free4: - fdclose(fdp, fp2, sv[1], td); + fdclose(fdp, fp2, rsv[1], td); fdrop(fp2, td); free3: - fdclose(fdp, fp1, sv[0], td); + fdclose(fdp, fp1, rsv[0], td); fdrop(fp1, td); free2: if (so2 != NULL) @@ -664,6 +652,23 @@ free1: return (error); } +int +socketpair(struct thread *td, struct socketpair_args *uap) +{ + int error, sv[2]; + + error = kern_socketpair(td, uap->domain, uap->type, + uap->protocol, sv); + if (error) + return (error); + error = copyout(sv, uap->rsv, 2 * sizeof(int)); + if (error) { + (void)kern_close(td, sv[0]); + (void)kern_close(td, sv[1]); + } + return (error); +} + static int sendit(td, s, mp, flags) struct thread *td; Modified: head/sys/sys/syscallsubr.h == --- head/sys/sys/syscallsubr.h Sun May 31 12:10:04 2009(r193166) +++ head/sys/sys/syscallsubr.h Sun May 31 12:12:38 2009(r193167) @@ -220,6 +220,8 @@ int kern_utimesat(struct thread *td, int intkern_wait(struct thread *td, pid_t pid, int *status, int options, struct rusage *rup); intkern_writev(struct thread *td, int fd, struct uio *auio); +intkern_socketpair(struct thread *td, int domain, int type, int protocol, + int *rsv); /* flags for kern_sigaction */ #defineKSA_OSIGSET 0x0001 /* uses osigact_t */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193168 - head/sys/compat/linux
Author: dchagin Date: Sun May 31 12:16:31 2009 New Revision: 193168 URL: http://svn.freebsd.org/changeset/base/193168 Log: Implement a variation of the socketpair() syscall which takes a flags in addition to the type argument. Approved by: kib (mentor) MFC after:1 month Modified: head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linux/linux_socket.c == --- head/sys/compat/linux/linux_socket.cSun May 31 12:12:38 2009 (r193167) +++ head/sys/compat/linux/linux_socket.cSun May 31 12:16:31 2009 (r193168) @@ -884,12 +884,20 @@ linux_socketpair(struct thread *td, stru int protocol; int *rsv; } */ bsd_args; + int error, socket_flags; + int sv[2]; bsd_args.domain = linux_to_bsd_domain(args->domain); if (bsd_args.domain != PF_LOCAL) return (EAFNOSUPPORT); - bsd_args.type = args->type; + socket_flags = args->type & ~LINUX_SOCK_TYPE_MASK; + if (socket_flags & ~(LINUX_SOCK_CLOEXEC | LINUX_SOCK_NONBLOCK)) + return (EINVAL); + bsd_args.type = args->type & LINUX_SOCK_TYPE_MASK; + if (bsd_args.type < 0 || bsd_args.type > LINUX_SOCK_MAX) + return (EINVAL); + if (args->protocol != 0 && args->protocol != PF_UNIX) /* @@ -902,7 +910,25 @@ linux_socketpair(struct thread *td, stru else bsd_args.protocol = 0; bsd_args.rsv = (int *)PTRIN(args->rsv); - return (socketpair(td, &bsd_args)); + error = kern_socketpair(td, bsd_args.domain, bsd_args.type, + bsd_args.protocol, sv); + if (error) + return (error); + error = linux_set_socket_flags(td, sv[0], socket_flags); + if (error) + goto out; + error = linux_set_socket_flags(td, sv[1], socket_flags); + if (error) + goto out; + + error = copyout(sv, bsd_args.rsv, 2 * sizeof(int)); + +out: + if (error) { + (void)kern_close(td, sv[0]); + (void)kern_close(td, sv[1]); + } + return (error); } struct linux_send_args { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193165 - head/sys/compat/linux
On Sun, May 31, 2009 at 12:04:01PM +, Dmitry Chagin wrote: > Author: dchagin > Date: Sun May 31 12:04:01 2009 > New Revision: 193165 > URL: http://svn.freebsd.org/changeset/base/193165 > Log: > Move new socket flags handling into a separate function as Linux > introduced more syscalls which uses these flags. I think this does not fulfill the purpose of LINUX_SOCK_CLOEXEC exactly: if another thread forks and execs at the wrong time, it may inherit the socket without the CLOEXEC flag set. The obvious way to fix this is to implement SOCK_CLOEXEC in the native syscalls, in such a way that other threads can never see the new fd without the CLOEXEC flag set. That could be fairly complicated and it is a pretty rare situation, however. -- Jilles Tjoelker ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193169 - head/bin/sh
Author: stefanf Date: Sun May 31 12:36:14 2009 New Revision: 193169 URL: http://svn.freebsd.org/changeset/base/193169 Log: Fix the eval command in combination with set -e. Before this change the shell would always terminate if eval returned with a non-zero exit status regardless if the status was actually tested. Unfortunately a new file-scope variable is needed, the alternative would only be to add a new parameter to all built-ins. PR: 134881 Modified: head/bin/sh/eval.c head/bin/sh/eval.h head/bin/sh/histedit.c head/bin/sh/main.c head/bin/sh/trap.c Modified: head/bin/sh/eval.c == --- head/bin/sh/eval.c Sun May 31 12:16:31 2009(r193168) +++ head/bin/sh/eval.c Sun May 31 12:36:14 2009(r193169) @@ -83,6 +83,7 @@ MKINIT int evalskip; /* set if we are s STATIC int skipcount; /* number of levels to skip */ MKINIT int loopnest; /* current loop nesting level */ int funcnest; /* depth of function calls */ +STATIC int builtin_flags; /* evalcommand flags for builtins */ char *commandname; @@ -147,7 +148,7 @@ evalcmd(int argc, char **argv) STPUTC('\0', concat); p = grabstackstr(concat); } -evalstring(p); +evalstring(p, builtin_flags & EV_TESTED); } return exitstatus; } @@ -158,7 +159,7 @@ evalcmd(int argc, char **argv) */ void -evalstring(char *s) +evalstring(char *s, int flags) { union node *n; struct stackmark smark; @@ -167,7 +168,7 @@ evalstring(char *s) setinputstring(s, 1); while ((n = parsecmd(0)) != NEOF) { if (n != NULL) - evaltree(n, 0); + evaltree(n, flags); popstackmark(&smark); } popfile(); @@ -839,6 +840,7 @@ evalcommand(union node *cmd, int flags, commandname = argv[0]; argptr = argv + 1; optptr = NULL; /* initialize nextopt */ + builtin_flags = flags; exitstatus = (*builtinfunc[cmdentry.u.index])(argc, argv); flushall(); cmddone: Modified: head/bin/sh/eval.h == --- head/bin/sh/eval.h Sun May 31 12:16:31 2009(r193168) +++ head/bin/sh/eval.h Sun May 31 12:36:14 2009(r193169) @@ -46,7 +46,7 @@ struct backcmd { /* result of evalbackc }; int evalcmd(int, char **); -void evalstring(char *); +void evalstring(char *, int); union node;/* BLETCH for ansi C */ void evaltree(union node *, int); void evalbackcmd(union node *, struct backcmd *); Modified: head/bin/sh/histedit.c == --- head/bin/sh/histedit.c Sun May 31 12:16:31 2009(r193168) +++ head/bin/sh/histedit.c Sun May 31 12:36:14 2009(r193169) @@ -350,7 +350,7 @@ histcmd(int argc, char **argv) if (displayhist) { out2str(s); } - evalstring(s); + evalstring(s, 0); if (displayhist && hist) { /* * XXX what about recursive and @@ -382,7 +382,7 @@ histcmd(int argc, char **argv) fclose(efp); editcmd = stalloc(strlen(editor) + strlen(editfile) + 2); sprintf(editcmd, "%s %s", editor, editfile); - evalstring(editcmd);/* XXX - should use no JC command */ + evalstring(editcmd, 0); /* XXX - should use no JC command */ INTON; readcmdfile(editfile); /* XXX - should read back - quick tst */ unlink(editfile); Modified: head/bin/sh/main.c == --- head/bin/sh/main.c Sun May 31 12:16:31 2009(r193168) +++ head/bin/sh/main.c Sun May 31 12:36:14 2009(r193169) @@ -178,7 +178,7 @@ state2: state3: state = 4; if (minusc) { - evalstring(minusc); + evalstring(minusc, 0); } if (sflag || minusc == NULL) { state4:/* XXX ??? - why isn't this before the "if" statement */ Modified: head/bin/sh/trap.c == --- head/bin/sh/trap.c Sun May 31 12:16:31 2009(r193168) +++ head/bin/sh/trap.c Sun May 31 12:36:14 2009(r193169) @@ -416,7 +416,7 @@ dotrap(void) if (i == SIGCHLD) ignore_sigchld++;
Re: svn commit: r193165 - head/sys/compat/linux
On Sun, May 31, 2009 at 02:26:42PM +0200, Jilles Tjoelker wrote: > On Sun, May 31, 2009 at 12:04:01PM +, Dmitry Chagin wrote: > > Author: dchagin > > Date: Sun May 31 12:04:01 2009 > > New Revision: 193165 > > URL: http://svn.freebsd.org/changeset/base/193165 > > > Log: > > Move new socket flags handling into a separate function as Linux > > introduced more syscalls which uses these flags. > > I think this does not fulfill the purpose of LINUX_SOCK_CLOEXEC exactly: > if another thread forks and execs at the wrong time, it may inherit the > socket without the CLOEXEC flag set. > > The obvious way to fix this is to implement SOCK_CLOEXEC in the native > syscalls, in such a way that other threads can never see the new fd > without the CLOEXEC flag set. > > That could be fairly complicated and it is a pretty rare situation, > however. This is well-known issue, that is omnipresent in the linuxolator. Your analysis is right, but until we implement corresponding facilities for the native ABI, linuxolator will be in is this state. Whether we really need to do the work for freebsd binaries is debatable. For the typical case, see linux_common_open(). pgpeeRGQkqN03.pgp Description: PGP signature
Re: svn commit: r193165 - head/sys/compat/linux
On Sun, May 31, 2009 at 03:45:55PM +0300, Kostik Belousov wrote: > On Sun, May 31, 2009 at 02:26:42PM +0200, Jilles Tjoelker wrote: > > On Sun, May 31, 2009 at 12:04:01PM +, Dmitry Chagin wrote: > > > Author: dchagin > > > Date: Sun May 31 12:04:01 2009 > > > New Revision: 193165 > > > URL: http://svn.freebsd.org/changeset/base/193165 > > > > > Log: > > > Move new socket flags handling into a separate function as Linux > > > introduced more syscalls which uses these flags. > > > > I think this does not fulfill the purpose of LINUX_SOCK_CLOEXEC exactly: > > if another thread forks and execs at the wrong time, it may inherit the > > socket without the CLOEXEC flag set. > > > > The obvious way to fix this is to implement SOCK_CLOEXEC in the native > > syscalls, in such a way that other threads can never see the new fd > > without the CLOEXEC flag set. > > > > That could be fairly complicated and it is a pretty rare situation, > > however. > > This is well-known issue, that is omnipresent in the linuxolator. > Your analysis is right, but until we implement corresponding > facilities for the native ABI, linuxolator will be in is this state. > Whether we really need to do the work for freebsd binaries is > debatable. > > For the typical case, see linux_common_open(). Mostly replying to myself. The fact that your statement about race is right actually points to the deficiency in the implementation of the linux_execve(), as opposed to the bug in the LINUX_SOCK_CLOEXEC handling. Complete execve(2) implementation should do single-threading for the curproc, and singlethreading happens only when all threads except the one doing execve cross the boundary. See call to thread_single in kern_execve. This does not really happen for linux ABI processes, since multithreading is implemented as multiprocessing. When (if) a singlethreading solution will be implemented for linux ABI, exec cannot happen between these two calls, since the thread is still in kernel not on the single-threading boundary. pgpNMV1foEquH.pgp Description: PGP signature
svn commit: r193171 - in head/sys/dev/usb: . storage
Author: deischen Date: Sun May 31 14:48:51 2009 New Revision: 193171 URL: http://svn.freebsd.org/changeset/base/193171 Log: Add a NO_SYNCHRONIZE_CACHE quirk for an AIPTEK2 part identified as Sunplus Technology Inc. This happens to sit in a Rosewill RX81U-ES-25A 2.5" SATA to USB 2.0 external enclosure. Reviewed by:Hans Petter Selasky Modified: head/sys/dev/usb/storage/umass.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/storage/umass.c == --- head/sys/dev/usb/storage/umass.cSun May 31 13:52:17 2009 (r193170) +++ head/sys/dev/usb/storage/umass.cSun May 31 14:48:51 2009 (r193171) @@ -396,6 +396,10 @@ static const struct umass_devdescr umass UMASS_PROTO_SCSI | UMASS_PROTO_BBB, NO_QUIRKS }, + {USB_VENDOR_AIPTEK2, USB_PRODUCT_AIPTEK2_SUNPLUS_TECH, RID_WILDCARD, + UMASS_PROTO_DEFAULT, + NO_SYNCHRONIZE_CACHE + }, {USB_VENDOR_ALCOR, USB_PRODUCT_ALCOR_AU6390, RID_WILDCARD, UMASS_PROTO_DEFAULT, NO_SYNCHRONIZE_CACHE Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsSun May 31 13:52:17 2009(r193170) +++ head/sys/dev/usb/usbdevsSun May 31 14:48:51 2009(r193171) @@ -805,6 +805,7 @@ product AINCOMM AWU2000B0x1001 AWU2000B /* AIPTEK products */ product AIPTEK POCKETCAM3M 0x2011 PocketCAM 3Mega product AIPTEK2 PENCAM_MEGA_1_3 0x504a PenCam Mega 1.3 +product AIPTEK2 SUNPLUS_TECH 0x0c15 Sunplus Technology Inc. /* AirPrime products */ product AIRPRIME PC52200x0112 CDMA Wireless PC Card ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193172 - head/sys/fs/nullfs
Author: kib Date: Sun May 31 14:52:45 2009 New Revision: 193172 URL: http://svn.freebsd.org/changeset/base/193172 Log: Lock the real null vnode lock before substitution of vp->v_vnlock. This should not really matter for correctness, since vp->v_lock is not locked before the call, and null_lock() holds the interlock, but makes the control flow for reclaim more clear. Tested by:pho Modified: head/sys/fs/nullfs/null_vnops.c Modified: head/sys/fs/nullfs/null_vnops.c == --- head/sys/fs/nullfs/null_vnops.c Sun May 31 14:48:51 2009 (r193171) +++ head/sys/fs/nullfs/null_vnops.c Sun May 31 14:52:45 2009 (r193172) @@ -683,14 +683,15 @@ null_reclaim(struct vop_reclaim_args *ap * Use the interlock to protect the clearing of v_data to * prevent faults in null_lock(). */ + lockmgr(&vp->v_lock, LK_EXCLUSIVE, NULL); VI_LOCK(vp); vp->v_data = NULL; vp->v_object = NULL; vp->v_vnlock = &vp->v_lock; - if (lowervp) { - lockmgr(vp->v_vnlock, LK_EXCLUSIVE | LK_INTERLOCK, VI_MTX(vp)); + VI_UNLOCK(vp); + if (lowervp) vput(lowervp); - } else + else panic("null_reclaim: reclaiming a node with no lowervp"); free(xp, M_NULLFSNODE); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193173 - head/sys/fs/nullfs
Author: kib Date: Sun May 31 14:54:20 2009 New Revision: 193173 URL: http://svn.freebsd.org/changeset/base/193173 Log: Do not drop vnode interlock in null_checkvp(). null_lock() verifies that v_data is not-null before calling NULLVPTOLOWERVP(), and dropping the interlock allows for reclaim to clean v_data and free the memory. While there, remove unneeded semicolons and convert the infinite loops to panics. I have a will to remove null_checkvp() altogether, or leave it as a trivial stub, but not now. Reported and tested by: pho Modified: head/sys/fs/nullfs/null_subr.c Modified: head/sys/fs/nullfs/null_subr.c == --- head/sys/fs/nullfs/null_subr.c Sun May 31 14:52:45 2009 (r193172) +++ head/sys/fs/nullfs/null_subr.c Sun May 31 14:54:20 2009 (r193173) @@ -269,20 +269,14 @@ null_hashrem(xp) #ifdef DIAGNOSTIC -#ifdef KDB -#definenull_checkvp_barrier1 -#else -#definenull_checkvp_barrier0 -#endif - struct vnode * null_checkvp(vp, fil, lno) struct vnode *vp; char *fil; int lno; { - int interlock = 0; struct null_node *a = VTONULL(vp); + #ifdef notyet /* * Can't do this check because vop_reclaim runs @@ -290,9 +284,8 @@ null_checkvp(vp, fil, lno) */ if (vp->v_op != null_vnodeop_p) { printf ("null_checkvp: on non-null-node\n"); - while (null_checkvp_barrier) /*WAIT*/ ; panic("null_checkvp"); - }; + } #endif if (a->null_lowervp == NULLVP) { /* Should never happen */ @@ -301,32 +294,24 @@ null_checkvp(vp, fil, lno) for (p = (u_long *) a, i = 0; i < 8; i++) printf(" %lx", p[i]); printf("\n"); - /* wait for debugger */ - while (null_checkvp_barrier) /*WAIT*/ ; panic("null_checkvp"); } - if (mtx_owned(VI_MTX(vp)) != 0) { - VI_UNLOCK(vp); - interlock = 1; - } - if (vrefcnt(a->null_lowervp) < 1) { + VI_LOCK_FLAGS(a->null_lowervp, MTX_DUPOK); + if (a->null_lowervp->v_usecount < 1) { int i; u_long *p; printf("vp = %p, unref'ed lowervp\n", (void *)vp); for (p = (u_long *) a, i = 0; i < 8; i++) printf(" %lx", p[i]); printf("\n"); - /* wait for debugger */ - while (null_checkvp_barrier) /*WAIT*/ ; panic ("null with unref'ed lowervp"); - }; - if (interlock != 0) - VI_LOCK(vp); + } + VI_UNLOCK(a->null_lowervp); #ifdef notyet printf("null %x/%d -> %x/%d [%s, %d]\n", NULLTOV(a), vrefcnt(NULLTOV(a)), a->null_lowervp, vrefcnt(a->null_lowervp), fil, lno); #endif - return a->null_lowervp; + return (a->null_lowervp); } #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193174 - in head/sys: kern sys
Author: kib Date: Sun May 31 14:57:43 2009 New Revision: 193174 URL: http://svn.freebsd.org/changeset/base/193174 Log: Eliminate code duplication in vn_fullpath1() around the cache lookups and calls to vn_vptocnp() by moving more of the common code to vn_vptocnp(). Rename vn_vptocnp() to vn_vptocnp_locked() to signify that cache is locked around the call. Do not track buffer position by both the pointer and offset, use only buflen to record the start of the free space. Export vn_vptocnp() for external consumers as a wrapper around vn_vptocnp_locked() that locks the cache and handles hold counts. Tested by:pho Modified: head/sys/kern/vfs_cache.c head/sys/sys/vnode.h Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Sun May 31 14:54:20 2009(r193173) +++ head/sys/kern/vfs_cache.c Sun May 31 14:57:43 2009(r193174) @@ -206,7 +206,7 @@ SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchs static void cache_zap(struct namecache *ncp); -static int vn_vptocnp(struct vnode **vp, char **bp, char *buf, u_int *buflen); +static int vn_vptocnp_locked(struct vnode **vp, char *buf, u_int *buflen); static int vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, u_int buflen); @@ -1036,12 +1036,55 @@ vn_fullpath_global(struct thread *td, st return (error); } +int +vn_vptocnp(struct vnode **vp, char *buf, u_int *buflen) +{ + int error; + + CACHE_RLOCK(); + error = vn_vptocnp_locked(vp, buf, buflen); + if (error == 0) { + /* +* vn_vptocnp_locked() dropped hold acquired by +* VOP_VPTOCNP immediately after locking the +* cache. Since we are going to drop the cache rlock, +* re-hold the result. +*/ + vhold(*vp); + CACHE_RUNLOCK(); + } + return (error); +} + static int -vn_vptocnp(struct vnode **vp, char **bp, char *buf, u_int *buflen) +vn_vptocnp_locked(struct vnode **vp, char *buf, u_int *buflen) { struct vnode *dvp; + struct namecache *ncp; int error, vfslocked; + TAILQ_FOREACH(ncp, &((*vp)->v_cache_dst), nc_dst) { + if ((ncp->nc_flag & NCF_ISDOTDOT) == 0) + break; + } + if (ncp != NULL) { + if (*buflen < ncp->nc_nlen) { + CACHE_RUNLOCK(); + numfullpathfail4++; + error = ENOMEM; + SDT_PROBE(vfs, namecache, fullpath, return, error, + startvp, NULL, 0, 0); + return (error); + } + *buflen -= ncp->nc_nlen; + memcpy(buf + *buflen, ncp->nc_name, ncp->nc_nlen); + SDT_PROBE(vfs, namecache, fullpath, hit, ncp->nc_dvp, + ncp->nc_name, vp, 0, 0); + *vp = ncp->nc_dvp; + return (0); + } + SDT_PROBE(vfs, namecache, fullpath, miss, vp, 0, 0, 0, 0); + vhold(*vp); CACHE_RUNLOCK(); vfslocked = VFS_LOCK_GIANT((*vp)->v_mount); @@ -1052,16 +1095,21 @@ vn_vptocnp(struct vnode **vp, char **bp, VFS_UNLOCK_GIANT(vfslocked); if (error) { numfullpathfail2++; + SDT_PROBE(vfs, namecache, fullpath, return, error, startvp, + NULL, 0, 0); return (error); } - *bp = buf + *buflen; + *vp = dvp; CACHE_RLOCK(); if ((*vp)->v_iflag & VI_DOOMED) { /* forced unmount */ CACHE_RUNLOCK(); vdrop(*vp); - return (ENOENT); + error = ENOENT; + SDT_PROBE(vfs, namecache, fullpath, return, error, startvp, + NULL, 0, 0); + return (error); } vdrop(*vp); @@ -1075,59 +1123,26 @@ static int vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, u_int buflen) { - char *bp; - int error, i, slash_prefixed; - struct namecache *ncp; + int error, slash_prefixed; #ifdef KDTRACE_HOOKS struct vnode *startvp = vp; #endif buflen--; - bp = buf + buflen; - *bp = '\0'; + buf[buflen] = '\0'; error = 0; slash_prefixed = 0; SDT_PROBE(vfs, namecache, fullpath, entry, vp, 0, 0, 0, 0); - CACHE_RLOCK(); numfullpathcalls++; + CACHE_RLOCK(); if (vp->v_type != VDIR) { - ncp = TAILQ_FIRST(&vp->v_cache_dst); - if (ncp != NULL) { - buflen -= ncp->nc_nlen; - for (i = ncp->nc_nlen - 1; i >= 0 && bp != buf; i--) - *--bp = ncp->nc_name[i]; - if (bp == buf) {
svn commit: r193175 - head/sys/fs/nullfs
Author: kib Date: Sun May 31 14:58:43 2009 New Revision: 193175 URL: http://svn.freebsd.org/changeset/base/193175 Log: Implement the bypass routine for VOP_VPTOCNP in nullfs. Among other things, this makes procfs /file working for executables started from nullfs mount. Tested by:pho PR: 94269, 104938 Modified: head/sys/fs/nullfs/null_vnops.c Modified: head/sys/fs/nullfs/null_vnops.c == --- head/sys/fs/nullfs/null_vnops.c Sun May 31 14:57:43 2009 (r193174) +++ head/sys/fs/nullfs/null_vnops.c Sun May 31 14:58:43 2009 (r193175) @@ -741,6 +741,55 @@ null_vptofh(struct vop_vptofh_args *ap) return VOP_VPTOFH(lvp, ap->a_fhp); } +static int +null_vptocnp(struct vop_vptocnp_args *ap) +{ + struct vnode *vp = ap->a_vp; + struct vnode **dvp = ap->a_vpp; + struct vnode *lvp, *ldvp; + int error, locked; + + if (vp->v_type == VDIR) + return (vop_stdvptocnp(ap)); + + locked = VOP_ISLOCKED(vp); + lvp = NULLVPTOLOWERVP(vp); + vhold(lvp); + VOP_UNLOCK(vp, 0); /* vp is held by vn_vptocnp_locked that called us */ + ldvp = lvp; + error = vn_vptocnp(&ldvp, ap->a_buf, ap->a_buflen); + vdrop(lvp); + if (error != 0) { + vn_lock(vp, locked | LK_RETRY); + return (ENOENT); + } + + /* +* Exclusive lock is required by insmntque1 call in +* null_nodeget() +*/ + error = vn_lock(ldvp, LK_EXCLUSIVE); + if (error != 0) { + vn_lock(vp, locked | LK_RETRY); + vdrop(ldvp); + return (ENOENT); + } + vref(ldvp); + vdrop(ldvp); + error = null_nodeget(vp->v_mount, ldvp, dvp); + if (error == 0) { +#ifdef DIAGNOSTIC + NULLVPTOLOWERVP(*dvp); +#endif + vhold(*dvp); + vput(*dvp); + } else + vput(ldvp); + + vn_lock(vp, locked | LK_RETRY); + return (error); +} + /* * Global vfs data structures */ @@ -762,6 +811,6 @@ struct vop_vector null_vnodeops = { .vop_setattr = null_setattr, .vop_strategy = VOP_EOPNOTSUPP, .vop_unlock = null_unlock, - .vop_vptocnp = vop_stdvptocnp, + .vop_vptocnp = null_vptocnp, .vop_vptofh = null_vptofh, }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193176 - head/sys/fs/pseudofs
Author: kib Date: Sun May 31 15:01:50 2009 New Revision: 193176 URL: http://svn.freebsd.org/changeset/base/193176 Log: Unlock the pseudofs vnode before calling fill method for pfs_readlink(). The fill code may need to lock another vnode, e.g. procfs file implementation. Reviewed by: des Tested by:pho MFC after:2 weeks Modified: head/sys/fs/pseudofs/pseudofs_vnops.c Modified: head/sys/fs/pseudofs/pseudofs_vnops.c == --- head/sys/fs/pseudofs/pseudofs_vnops.c Sun May 31 14:58:43 2009 (r193175) +++ head/sys/fs/pseudofs/pseudofs_vnops.c Sun May 31 15:01:50 2009 (r193176) @@ -827,7 +827,7 @@ pfs_readlink(struct vop_readlink_args *v struct proc *proc = NULL; char buf[PATH_MAX]; struct sbuf sb; - int error; + int error, locked; PFS_TRACE(("%s", pn->pn_name)); pfs_assert_not_owned(pn); @@ -849,6 +849,9 @@ pfs_readlink(struct vop_readlink_args *v _PHOLD(proc); PROC_UNLOCK(proc); } + vhold(vn); + locked = VOP_ISLOCKED(vn); + VOP_UNLOCK(vn, 0); /* sbuf_new() can't fail with a static buffer */ sbuf_new(&sb, buf, sizeof buf, 0); @@ -857,6 +860,8 @@ pfs_readlink(struct vop_readlink_args *v if (proc != NULL) PRELE(proc); + vn_lock(vn, locked | LK_RETRY); + vdrop(vn); if (error) { sbuf_delete(&sb); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193177 - head/usr.bin/kdump
Author: zec Date: Sun May 31 15:41:46 2009 New Revision: 193177 URL: http://svn.freebsd.org/changeset/base/193177 Log: Unbreak buildworld. (not waiting for an approval from mentor (julian) due to emergency) Modified: head/usr.bin/kdump/mkioctls Modified: head/usr.bin/kdump/mkioctls == --- head/usr.bin/kdump/mkioctls Sun May 31 15:01:50 2009(r193176) +++ head/usr.bin/kdump/mkioctls Sun May 31 15:41:46 2009(r193177) @@ -41,6 +41,7 @@ BEGIN { print "#include " print "#include " print "#include " + print "#include " print "#include " print "#include " print "#include " ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193178 - in head/tools/regression/bin/sh: builtins set-e
Author: stefanf Date: Sun May 31 17:23:27 2009 New Revision: 193178 URL: http://svn.freebsd.org/changeset/base/193178 Log: Add tests for r193169. Added: head/tools/regression/bin/sh/builtins/eval1.0 (contents, props changed) head/tools/regression/bin/sh/set-e/eval1.0 (contents, props changed) head/tools/regression/bin/sh/set-e/eval2.1 (contents, props changed) Modified: head/tools/regression/bin/sh/set-e/not2.0 Added: head/tools/regression/bin/sh/builtins/eval1.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/eval1.0 Sun May 31 17:23:27 2009(r193178) @@ -0,0 +1,9 @@ +# $FreeBSD$ +set -e + +eval +eval "" "" +eval "true" +! eval "false + +" Added: head/tools/regression/bin/sh/set-e/eval1.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/set-e/eval1.0 Sun May 31 17:23:27 2009 (r193178) @@ -0,0 +1,3 @@ +# $FreeBSD$ +set -e +eval false || true Added: head/tools/regression/bin/sh/set-e/eval2.1 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/set-e/eval2.1 Sun May 31 17:23:27 2009 (r193178) @@ -0,0 +1,4 @@ +# $FreeBSD$ +set -e +eval false +exit 0 Modified: head/tools/regression/bin/sh/set-e/not2.0 == --- head/tools/regression/bin/sh/set-e/not2.0 Sun May 31 15:41:46 2009 (r193177) +++ head/tools/regression/bin/sh/set-e/not2.0 Sun May 31 17:23:27 2009 (r193178) @@ -1,3 +1,4 @@ # $FreeBSD$ set -e ! false +! eval false ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193180 - in stable/7/share/man: . man3 man4 man5 man7 man8 man9
Author: ed Date: Sun May 31 18:06:12 2009 New Revision: 193180 URL: http://svn.freebsd.org/changeset/base/193180 Log: MFC r190855: Add C++ operators to operator(7) manual page. Submitted by: Christoph Mallon Modified: stable/7/share/man/ (props changed) stable/7/share/man/man3/ (props changed) stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man5/ (props changed) stable/7/share/man/man7/ (props changed) stable/7/share/man/man7/operator.7 stable/7/share/man/man8/ (props changed) stable/7/share/man/man9/ (props changed) Modified: stable/7/share/man/man7/operator.7 == --- stable/7/share/man/man7/operator.7 Sun May 31 18:03:06 2009 (r193179) +++ stable/7/share/man/man7/operator.7 Sun May 31 18:06:12 2009 (r193180) @@ -32,19 +32,20 @@ .\"@(#)operator.7 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd January 22, 2003 +.Dd April 8, 2009 .Dt OPERATOR 7 .Os .Sh NAME .Nm operator -.Nd C operator precedence and order of evaluation +.Nd C and C++ operator precedence and order of evaluation .Sh DESCRIPTION .Bd -ragged -offset indent -compact -.Bl -column "= += -= *= /= %= <<= >>= &= ^= |=" +.Bl -column "! ~ ++ -- - (type) * & sizeof new delete" .It Sy "Operator Associativity" .It " -" .It "() [] -> .left to right" -.It "! ~ ++ -- - (type) * & sizeof right to left" +.It "! ~ ++ -- - (type) * & sizeof new delete right to left" +.It "->* .*left to right .It "* / % left to right" .It "+ - left to right" .It "<< >> left to right" @@ -56,7 +57,8 @@ .It "&&left to right" .It "||left to right" .It "?:right to left" -.It "= += -= *= /= %= <<= >>= &= ^= |= right to left" +.It "= += -= *= /= %= <<= >>= &= ^= |= throw right to left" +.It "?: (C++, third operand) right to left" .It ", left to right" .El .Ed ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193181 - in stable/6/share/man: . man4 man5 man7 man9
Author: ed Date: Sun May 31 18:06:46 2009 New Revision: 193181 URL: http://svn.freebsd.org/changeset/base/193181 Log: MFC r190855: Add C++ operators to operator(7) manual page. Submitted by: Christoph Mallon Modified: stable/6/share/man/ (props changed) stable/6/share/man/man4/ (props changed) stable/6/share/man/man4/xl.4 (props changed) stable/6/share/man/man5/ (props changed) stable/6/share/man/man7/ (props changed) stable/6/share/man/man7/operator.7 stable/6/share/man/man7/ports.7 (props changed) stable/6/share/man/man9/ (props changed) Modified: stable/6/share/man/man7/operator.7 == --- stable/6/share/man/man7/operator.7 Sun May 31 18:06:12 2009 (r193180) +++ stable/6/share/man/man7/operator.7 Sun May 31 18:06:46 2009 (r193181) @@ -32,19 +32,20 @@ .\"@(#)operator.7 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd January 22, 2003 +.Dd April 8, 2009 .Dt OPERATOR 7 .Os .Sh NAME .Nm operator -.Nd C operator precedence and order of evaluation +.Nd C and C++ operator precedence and order of evaluation .Sh DESCRIPTION .Bd -ragged -offset indent -compact -.Bl -column "= += -= *= /= %= <<= >>= &= ^= |=" +.Bl -column "! ~ ++ -- - (type) * & sizeof new delete" .It Sy "Operator Associativity" .It " -" .It "() [] -> .left to right" -.It "! ~ ++ -- - (type) * & sizeof right to left" +.It "! ~ ++ -- - (type) * & sizeof new delete right to left" +.It "->* .*left to right .It "* / % left to right" .It "+ - left to right" .It "<< >> left to right" @@ -56,7 +57,8 @@ .It "&&left to right" .It "||left to right" .It "?:right to left" -.It "= += -= *= /= %= <<= >>= &= ^= |= right to left" +.It "= += -= *= /= %= <<= >>= &= ^= |= throw right to left" +.It "?: (C++, third operand) right to left" .It ", left to right" .El .Ed ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193182 - stable/7/share/misc
Author: ed Date: Sun May 31 18:14:24 2009 New Revision: 193182 URL: http://svn.freebsd.org/changeset/base/193182 Log: Correct the previous commit. Also merge the operator file in share/misc, that is also part of r190855. Modified: stable/7/share/misc/ (props changed) stable/7/share/misc/iso639 (props changed) stable/7/share/misc/operator Modified: stable/7/share/misc/operator == --- stable/7/share/misc/operatorSun May 31 18:06:46 2009 (r193181) +++ stable/7/share/misc/operatorSun May 31 18:14:24 2009 (r193182) @@ -1,19 +1,21 @@ -Operator Associativity -- -() [] -> . left to right -! ~ ++ -- - (type) * & sizeof right to left -* / % left to right -+ -left to right -<< >> left to right -< <= > >= left to right -== != left to right -& left to right -^ left to right -| left to right -&& left to right -|| left to right -?: right to left -= += -= *= /= %= <<= >>= &= ^= |= right to left -, left to right +Operator Associativity +- +() [] -> . left to right +! ~ ++ -- - (type) * & sizeof new delete right to left +->* .* left to right +* / % left to right ++ -left to right +<< >> left to right +< <= > >= left to right +== != left to right +& left to right +^ left to right +| left to right +&& left to right +|| left to right +?: right to left += += -= *= /= %= <<= >>= &= ^= |= throwright to left +?: (C++, third operand)right to left +, left to right $FreeBSD$ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193183 - stable/6/share/misc
Author: ed Date: Sun May 31 18:14:40 2009 New Revision: 193183 URL: http://svn.freebsd.org/changeset/base/193183 Log: Correct the previous commit. Also merge the operator file in share/misc, that is also part of r190855. Modified: stable/6/share/misc/ (props changed) stable/6/share/misc/operator Modified: stable/6/share/misc/operator == --- stable/6/share/misc/operatorSun May 31 18:14:24 2009 (r193182) +++ stable/6/share/misc/operatorSun May 31 18:14:40 2009 (r193183) @@ -1,19 +1,21 @@ -Operator Associativity -- -() [] -> . left to right -! ~ ++ -- - (type) * & sizeof right to left -* / % left to right -+ -left to right -<< >> left to right -< <= > >= left to right -== != left to right -& left to right -^ left to right -| left to right -&& left to right -|| left to right -?: right to left -= += -= *= /= %= <<= >>= &= ^= |= right to left -, left to right +Operator Associativity +- +() [] -> . left to right +! ~ ++ -- - (type) * & sizeof new delete right to left +->* .* left to right +* / % left to right ++ -left to right +<< >> left to right +< <= > >= left to right +== != left to right +& left to right +^ left to right +| left to right +&& left to right +|| left to right +?: right to left += += -= *= /= %= <<= >>= &= ^= |= throwright to left +?: (C++, third operand)right to left +, left to right $FreeBSD$ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193112 - head/etc/rc.d
Dmitry Morozovsky wrote: > Doug, > > On Sat, 30 May 2009, Doug Barton wrote: > > DB> Author: dougb > DB> Date: Sat May 30 19:38:51 2009 > DB> New Revision: 193112 > DB> URL: http://svn.freebsd.org/changeset/base/193112 > DB> > DB> Log: > DB> As previously advertised, remove this script prior to the 8.0 branch. > > Was there an agreement what should one do with dumping to gmirror (see > sbin/geom/class/mirror/gmirror.8) ? I'm not familiar with that issue, but it sounds like something that needs its own rc.d script. If someone who knows what is supposed to happen wants to write something up and send it to the freebsd-rc@ list I'll be glad to help review it. Meanwhile, the old early.sh script has been emitting a warning that it is deprecated every time it's run for 19 months now ... Doug -- This .signature sanitized for your protection ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193184 - in head/sys/dev/syscons: . teken
Author: ed Date: Sun May 31 19:35:41 2009 New Revision: 193184 URL: http://svn.freebsd.org/changeset/base/193184 Log: Restore support for bell pitch/duration. Because we only support a single argument to tf_param, use 16 bits for the pitch and 16 bits for the duration. While there, make the argument unsigned. There isn't a single param call that needs a signed integer. Submitted by: danfe (modified) Modified: head/sys/dev/syscons/scterm-teken.c head/sys/dev/syscons/teken/sequences head/sys/dev/syscons/teken/teken.c head/sys/dev/syscons/teken/teken.h head/sys/dev/syscons/teken/teken_subr_compat.h Modified: head/sys/dev/syscons/scterm-teken.c == --- head/sys/dev/syscons/scterm-teken.c Sun May 31 18:14:40 2009 (r193183) +++ head/sys/dev/syscons/scterm-teken.c Sun May 31 19:35:41 2009 (r193184) @@ -491,7 +491,7 @@ scteken_copy(void *arg, const teken_rect } static void -scteken_param(void *arg, int cmd, int value) +scteken_param(void *arg, int cmd, unsigned int value) { scr_stat *scp = arg; @@ -508,6 +508,10 @@ scteken_param(void *arg, int cmd, int va case TP_SWITCHVT: sc_switch_scr(scp->sc, value); break; + case TP_SETBELLPD: + scp->bell_pitch = TP_SETBELLPD_PITCH(value); + scp->bell_duration = TP_SETBELLPD_DURATION(value); + break; } } Modified: head/sys/dev/syscons/teken/sequences == --- head/sys/dev/syscons/teken/sequencesSun May 31 18:14:40 2009 (r193183) +++ head/sys/dev/syscons/teken/sequencesSun May 31 19:35:41 2009 (r193184) @@ -102,6 +102,7 @@ VPA Vertical Position Absolute ^[ [ d # Cons25 compatibility sequences C25ADBGCons25 set adapter background ^[ [ = Gr C25ADFGCons25 set adapter foreground ^[ [ = Fr +C25BLPDCons25 set bell pitch duration ^[ [ = Br r C25CURSCons25 set cursor type ^[ [ = Sr C25VTSWCons25 switch virtual terminal ^[ [ z r Modified: head/sys/dev/syscons/teken/teken.c == --- head/sys/dev/syscons/teken/teken.c Sun May 31 18:14:40 2009 (r193183) +++ head/sys/dev/syscons/teken/teken.c Sun May 31 19:35:41 2009 (r193184) @@ -167,7 +167,7 @@ teken_funcs_copy(teken_t *t, const teken } static inline void -teken_funcs_param(teken_t *t, int cmd, int value) +teken_funcs_param(teken_t *t, int cmd, unsigned int value) { t->t_funcs->tf_param(t->t_softc, cmd, value); Modified: head/sys/dev/syscons/teken/teken.h == --- head/sys/dev/syscons/teken/teken.h Sun May 31 18:14:40 2009 (r193183) +++ head/sys/dev/syscons/teken/teken.h Sun May 31 19:35:41 2009 (r193184) @@ -98,13 +98,16 @@ typedef void tf_putchar_t(void *, const typedef void tf_fill_t(void *, const teken_rect_t *, teken_char_t, const teken_attr_t *); typedef void tf_copy_t(void *, const teken_rect_t *, const teken_pos_t *); -typedef void tf_param_t(void *, int, int); +typedef void tf_param_t(void *, int, unsigned int); #defineTP_SHOWCURSOR 0 #defineTP_CURSORKEYS 1 #defineTP_KEYPADAPP2 #defineTP_AUTOREPEAT 3 #defineTP_SWITCHVT 4 #defineTP_132COLS 5 +#defineTP_SETBELLPD6 +#defineTP_SETBELLPD_PITCH(pd) ((pd) >> 16) +#defineTP_SETBELLPD_DURATION(pd) ((pd) & 0x) typedef void tf_respond_t(void *, const void *, size_t); typedef struct { Modified: head/sys/dev/syscons/teken/teken_subr_compat.h == --- head/sys/dev/syscons/teken/teken_subr_compat.h Sun May 31 18:14:40 2009(r193183) +++ head/sys/dev/syscons/teken/teken_subr_compat.h Sun May 31 19:35:41 2009(r193184) @@ -66,6 +66,15 @@ teken_subr_cons25_switch_virtual_termina teken_funcs_param(t, TP_SWITCHVT, vt); } +static void +teken_subr_cons25_set_bell_pitch_duration(teken_t *t, unsigned int pitch, +unsigned int duration) +{ + + teken_funcs_param(t, TP_SETBELLPD, (pitch << 16) | + (duration & 0x)); +} + #if 0 static void teken_subr_vt52_decid(teken_t *t) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193185 - head/bin/sh
Author: jilles Date: Sun May 31 19:37:06 2009 New Revision: 193185 URL: http://svn.freebsd.org/changeset/base/193185 Log: sh: Make read's timeout (-t) apply to the entire line, not only the first character. This avoids using non-standard behaviour of the old (upto FreeBSD 7) TTY layer: it reprocesses the input queue when switching to canonical mode. The new TTY layer does not provide this functionality and so read -t worked very poorly (first character is not echoed, cannot be backspaced but is still read). This also agrees with what most other shells with read -t do. PR: bin/129566 Reviewed by: stefanf Approved by: ed (mentor) Modified: head/bin/sh/miscbltin.c head/bin/sh/sh.1 Modified: head/bin/sh/miscbltin.c == --- head/bin/sh/miscbltin.c Sun May 31 19:35:41 2009(r193184) +++ head/bin/sh/miscbltin.c Sun May 31 19:37:06 2009(r193185) @@ -103,8 +103,6 @@ readcmd(int argc __unused, char **argv _ struct timeval tv; char *tvptr; fd_set ifds; - struct termios told, tnew; - int tsaved; rflag = 0; prompt = NULL; @@ -151,26 +149,11 @@ readcmd(int argc __unused, char **argv _ if (tv.tv_sec >= 0) { /* -* See if we can disable input processing; this will -* not give the desired result if we are in a pipeline -* and someone upstream is still in line-by-line mode. -*/ - tsaved = 0; - if (tcgetattr(0, &told) == 0) { - memcpy(&tnew, &told, sizeof(told)); - cfmakeraw(&tnew); - tnew.c_iflag |= told.c_iflag & ICRNL; - tcsetattr(0, TCSANOW, &tnew); - tsaved = 1; - } - /* * Wait for something to become available. */ FD_ZERO(&ifds); FD_SET(0, &ifds); status = select(1, &ifds, NULL, NULL, &tv); - if (tsaved) - tcsetattr(0, TCSANOW, &told); /* * If there's nothing ready, return an error. */ Modified: head/bin/sh/sh.1 == --- head/bin/sh/sh.1Sun May 31 19:35:41 2009(r193184) +++ head/bin/sh/sh.1Sun May 31 19:37:06 2009(r193185) @@ -32,7 +32,7 @@ .\"from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd October 7, 2006 +.Dd May 31, 2009 .Dt SH 1 .Os .Sh NAME @@ -1949,7 +1949,7 @@ If the .Fl t option is specified and the .Ar timeout -elapses before any input is supplied, +elapses before a complete line of input is supplied, the .Ic read command will return an exit status of 1 without assigning any values. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193156 - in head/sys: conf modules modules/cpufreq powerpc/aim powerpc/booke powerpc/conf powerpc/cpufreq powerpc/ofw powerpc/powermac powerpc/powerpc
Nathan Whitehorn wrote: Nathan Whitehorn wrote: Author: nwhitehorn Date: Sun May 31 09:01:23 2009 New Revision: 193156 URL: http://svn.freebsd.org/changeset/base/193156 Log: Introduce support for cpufreq on PowerPC with the dynamic frequency switching capabilities of the MPC7447A and MPC7448. Based on code by: Andreas Tobler Man, you've stolen me 5MHz! :) svn r193177: dev.cpu.0.freq: 1499 dev.cpu.0.freq_levels: 1499/-1 749/-1 Previous patch: dev.cpu.0.freq: 1504 dev.cpu.0.freq_levels: 1504/-1 752/-1 Thanks a lot! Andreas ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193186 - head/sys/kern
Author: kib Date: Sun May 31 20:16:06 2009 New Revision: 193186 URL: http://svn.freebsd.org/changeset/base/193186 Log: Unbreak the build. Add missed probes. Reviewed by: rwatson Pointy hat to:me Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c == --- head/sys/kern/vfs_cache.c Sun May 31 19:37:06 2009(r193185) +++ head/sys/kern/vfs_cache.c Sun May 31 20:16:06 2009(r193186) @@ -1073,7 +1073,7 @@ vn_vptocnp_locked(struct vnode **vp, cha numfullpathfail4++; error = ENOMEM; SDT_PROBE(vfs, namecache, fullpath, return, error, - startvp, NULL, 0, 0); + vp, NULL, 0, 0); return (error); } *buflen -= ncp->nc_nlen; @@ -1095,7 +1095,7 @@ vn_vptocnp_locked(struct vnode **vp, cha VFS_UNLOCK_GIANT(vfslocked); if (error) { numfullpathfail2++; - SDT_PROBE(vfs, namecache, fullpath, return, error, startvp, + SDT_PROBE(vfs, namecache, fullpath, return, error, vp, NULL, 0, 0); return (error); } @@ -1107,7 +1107,7 @@ vn_vptocnp_locked(struct vnode **vp, cha CACHE_RUNLOCK(); vdrop(*vp); error = ENOENT; - SDT_PROBE(vfs, namecache, fullpath, return, error, startvp, + SDT_PROBE(vfs, namecache, fullpath, return, error, vp, NULL, 0, 0); return (error); } @@ -1150,6 +1150,8 @@ vn_fullpath1(struct thread *td, struct v if (vp->v_iflag & VI_DOOMED) { /* forced unmount */ CACHE_RUNLOCK(); error = ENOENT; + SDT_PROBE(vfs, namecache, fullpath, return, + error, vp, NULL, 0, 0); break; } vp = vp->v_mount->mnt_vnodecovered; @@ -1159,6 +1161,8 @@ vn_fullpath1(struct thread *td, struct v CACHE_RUNLOCK(); numfullpathfail1++; error = ENOTDIR; + SDT_PROBE(vfs, namecache, fullpath, return, + error, vp, NULL, 0, 0); break; } error = vn_vptocnp_locked(&vp, buf, &buflen); @@ -1166,6 +1170,8 @@ vn_fullpath1(struct thread *td, struct v break; if (buflen == 0) { error = ENOMEM; + SDT_PROBE(vfs, namecache, fullpath, return, error, + startvp, NULL, 0, 0); break; } buf[--buflen] = '/'; @@ -1177,8 +1183,8 @@ vn_fullpath1(struct thread *td, struct v if (buflen == 0) { CACHE_RUNLOCK(); numfullpathfail4++; - SDT_PROBE(vfs, namecache, fullpath, return, 0, - startvp, fullpath, 0, 0); + SDT_PROBE(vfs, namecache, fullpath, return, ENOMEM, + startvp, NULL, 0, 0); return (ENOMEM); } buf[--buflen] = '/'; @@ -1186,7 +1192,7 @@ vn_fullpath1(struct thread *td, struct v numfullpathfound++; CACHE_RUNLOCK(); - SDT_PROBE(vfs, namecache, fullpath, return, 0, startvp, buf + *buflen, + SDT_PROBE(vfs, namecache, fullpath, return, 0, startvp, buf + buflen, 0, 0); *retbuf = buf + buflen; return (0); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193187 - in head/sys: fs/nfsclient kern nfsclient sys
Author: alc Date: Sun May 31 20:18:02 2009 New Revision: 193187 URL: http://svn.freebsd.org/changeset/base/193187 Log: nfs_write() can use the recently introduced vfs_bio_set_valid() instead of vfs_bio_set_validclean(), thereby avoiding the page queues lock. Garbage collect vfs_bio_set_validclean(). Nothing uses it any longer. Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/kern/vfs_bio.c head/sys/nfsclient/nfs_bio.c head/sys/sys/buf.h Modified: head/sys/fs/nfsclient/nfs_clbio.c == --- head/sys/fs/nfsclient/nfs_clbio.c Sun May 31 20:16:06 2009 (r193186) +++ head/sys/fs/nfsclient/nfs_clbio.c Sun May 31 20:18:02 2009 (r193187) @@ -1302,7 +1302,7 @@ again: bp->b_dirtyoff = on; bp->b_dirtyend = on + n; } - vfs_bio_set_validclean(bp, on, n); + vfs_bio_set_valid(bp, on, n); } /* Modified: head/sys/kern/vfs_bio.c == --- head/sys/kern/vfs_bio.c Sun May 31 20:16:06 2009(r193186) +++ head/sys/kern/vfs_bio.c Sun May 31 20:18:02 2009(r193187) @@ -3673,47 +3673,6 @@ vfs_bio_set_valid(struct buf *bp, int ba } /* - * vfs_bio_set_validclean: - * - * Set the range within the buffer to valid and clean. The range is - * relative to the beginning of the buffer, b_offset. Note that b_offset - * itself may be offset from the beginning of the first page. - * - */ - -void -vfs_bio_set_validclean(struct buf *bp, int base, int size) -{ - int i, n; - vm_page_t m; - - if (!(bp->b_flags & B_VMIO)) - return; - /* -* Fixup base to be relative to beginning of first page. -* Set initial n to be the maximum number of bytes in the -* first page that can be validated. -*/ - - base += (bp->b_offset & PAGE_MASK); - n = PAGE_SIZE - (base & PAGE_MASK); - - VM_OBJECT_LOCK(bp->b_bufobj->bo_object); - vm_page_lock_queues(); - for (i = base / PAGE_SIZE; size > 0 && i < bp->b_npages; ++i) { - m = bp->b_pages[i]; - if (n > size) - n = size; - vm_page_set_validclean(m, base & PAGE_MASK, n); - base += n; - size -= n; - n = PAGE_SIZE; - } - vm_page_unlock_queues(); - VM_OBJECT_UNLOCK(bp->b_bufobj->bo_object); -} - -/* * vfs_bio_clrbuf: * * If the specified buffer is a non-VMIO buffer, clear the entire Modified: head/sys/nfsclient/nfs_bio.c == --- head/sys/nfsclient/nfs_bio.cSun May 31 20:16:06 2009 (r193186) +++ head/sys/nfsclient/nfs_bio.cSun May 31 20:18:02 2009 (r193187) @@ -1200,7 +1200,7 @@ again: bp->b_dirtyoff = on; bp->b_dirtyend = on + n; } - vfs_bio_set_validclean(bp, on, n); + vfs_bio_set_valid(bp, on, n); } /* Modified: head/sys/sys/buf.h == --- head/sys/sys/buf.h Sun May 31 20:16:06 2009(r193186) +++ head/sys/sys/buf.h Sun May 31 20:18:02 2009(r193187) @@ -499,7 +499,6 @@ int cluster_read(struct vnode *, u_quad_ intcluster_wbuild(struct vnode *, long, daddr_t, int); void cluster_write(struct vnode *, struct buf *, u_quad_t, int); void vfs_bio_set_valid(struct buf *, int base, int size); -void vfs_bio_set_validclean(struct buf *, int base, int size); void vfs_bio_clrbuf(struct buf *); void vfs_busy_pages(struct buf *, int clear_modify); void vfs_unbusy_pages(struct buf *); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193188 - head/usr.sbin/ipfwpcap
Author: ed Date: Sun May 31 20:59:20 2009 New Revision: 193188 URL: http://svn.freebsd.org/changeset/base/193188 Log: Several cleanups to ipfwpcap(8). - Enable WARNS?=6. - Include missing headers. - Mark prog and pidfile as static. Remove unneeded initializer. - Use ANSI prototypes. - Remove unneeded fp variable. - snprintf() guarantees the buffer to be null terminated. Remove unneeded - 1 and bzero call. - Remove unneeded casting. Submitted by: Pawel Worach, Christoph Mallon Modified: head/usr.sbin/ipfwpcap/Makefile head/usr.sbin/ipfwpcap/ipfwpcap.c Modified: head/usr.sbin/ipfwpcap/Makefile == --- head/usr.sbin/ipfwpcap/Makefile Sun May 31 20:18:02 2009 (r193187) +++ head/usr.sbin/ipfwpcap/Makefile Sun May 31 20:59:20 2009 (r193188) @@ -11,6 +11,8 @@ DPADD=${LIBPCAP} MAN= ipfwpcap.8 +WARNS?=6 + .include test: $(CMD) Modified: head/usr.sbin/ipfwpcap/ipfwpcap.c == --- head/usr.sbin/ipfwpcap/ipfwpcap.c Sun May 31 20:18:02 2009 (r193187) +++ head/usr.sbin/ipfwpcap/ipfwpcap.c Sun May 31 20:59:20 2009 (r193188) @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include #include #include @@ -61,15 +63,14 @@ static int reflect = 0; /* 1 == write p static ssize_t totbytes = 0, maxbytes = 0; static ssize_t totpkts = 0, maxpkts = 0; -char *prog = NULL; -char pidfile[MAXPATHLEN] = { '\0' }; +static char *prog = NULL; +static char pidfile[MAXPATHLEN]; /* * tidy up. */ -void -quit(sig) -int sig; +static void +quit(int sig) { (void) unlink(pidfile); exit(sig); @@ -79,80 +80,76 @@ int sig; * do the "paper work" * - save my own pid in /var/run/$0.{port#}.pid */ -okay(pn) -int pn; +static void +okay(int pn) { - FILE *fp; - int fd, numlen, n; + int fd; char *p, numbuf[80]; - numlen = sizeof(numbuf); - bzero(numbuf, numlen); - snprintf(numbuf, numlen-1, "%ld\n", getpid()); - numlen = strlen(numbuf); - if (pidfile[0] == '\0') { - p = (char *)rindex(prog, '/'); - p = (p == NULL) ? prog : p+1 ; + p = rindex(prog, '/'); + p = (p == NULL) ? prog : p + 1; - snprintf(pidfile, sizeof(pidfile)-1, + snprintf(pidfile, sizeof pidfile, "%s%s.%d.pid", _PATH_VARRUN, p, pn); } fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL, 0644); - if (fd < 0) { perror(pidfile); exit(21); } - -siginterrupt(SIGTERM, 1); -siginterrupt(SIGHUP, 1); -signal (SIGTERM, quit); -signal (SIGHUP, quit); -signal (SIGINT, quit); + if (fd < 0) { + perror(pidfile); + exit(21); + } - n = write(fd, numbuf, numlen); - if (n < 0) { perror(pidfile); quit(23); } + siginterrupt(SIGTERM, 1); + siginterrupt(SIGHUP, 1); + signal(SIGTERM, quit); + signal(SIGHUP, quit); + signal(SIGINT, quit); + + snprintf(numbuf, sizeof numbuf, "%d\n", getpid()); + if (write(fd, numbuf, strlen(numbuf)) < 0) { + perror(pidfile); + quit(23); + } (void) close(fd); } -usage() +static void +usage(void) { - fprintf(stderr, "\ -\n\ -usage:\n\ -%s [-dr] [-b maxbytes] [-p maxpkts] [-P pidfile] portnum dumpfile\n\ -\n\ -where:\n\ - '-d' = enable debugging messages.\n\ - '-r' = reflect. write packets back to the divert socket.\n\ - (ie. simulate the original intent of \"ipfw tee\").\n\ - '-rr' = indicate that it is okay to quit if packet-count or\n\ - byte-count limits are reached (see the NOTE below\n\ - about what this implies).\n\ - '-b bytcnt' = stop dumping after {bytcnt} bytes.\n\ - '-p pktcnt' = stop dumping after {pktcnt} packets.\n\ - '-P pidfile' = alternate file to store the PID\n\ - (default: /var/run/%s.{portnum}.pid).\n\ -\n\ - portnum = divert(4) socket port number.\n\ - dumpfile = file to write captured packets (tcpdump format).\n\ - (specify '-' to write packets to stdout).\n\ -\n\ -", prog, prog); - - fprintf(stderr, "\ -The '-r' option should not be necessary, but because \"ipfw tee\" is broken\n\ -(see BUGS in ipfw(8) for details) this feature can be used along with\n\ -an \"ipfw divert\" rule to simulate the original intent of \"ipfw tee\".\n\ -\n\ -NOTE: With an \"ipfw divert\" rule, diverted packets will silently\n\ - disappear if there is nothing listening to the divert socket.\n\ -\n\ -"); - exit(-1); + fprintf(stderr, +"\n" +"usage:\n" +"%s [-dr] [-b maxbytes] [-p maxpkts] [-P pidfile] portnum dumpfile\n" +"\n" +"
svn commit: r193189 - head/lib/libstand
Author: ed Date: Sun May 31 21:29:07 2009 New Revision: 193189 URL: http://svn.freebsd.org/changeset/base/193189 Log: Fix minor issues in libstand. - Don't call tftp_makereq() with too many arguments. - Don't forget to close one of the comments. Submitted by: Pawel Worach Modified: head/lib/libstand/bootp.c head/lib/libstand/tftp.c Modified: head/lib/libstand/bootp.c == --- head/lib/libstand/bootp.c Sun May 31 20:59:20 2009(r193188) +++ head/lib/libstand/bootp.c Sun May 31 21:29:07 2009(r193189) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #defineDHCP_ENV_NOVENDOR 1 /* do not parse vendor options */ #defineDHCP_ENV_PXE10 /* assume pxe vendor options */ -#defineDHCP_ENV_FREEBSD11 /* assume freebsd vendor options +#defineDHCP_ENV_FREEBSD11 /* assume freebsd vendor options */ /* set DHCP_ENV to one of the values above to export dhcp options to kenv */ #define DHCP_ENV DHCP_ENV_NO_VENDOR Modified: head/lib/libstand/tftp.c == --- head/lib/libstand/tftp.cSun May 31 20:59:20 2009(r193188) +++ head/lib/libstand/tftp.cSun May 31 21:29:07 2009(r193189) @@ -275,7 +275,7 @@ tftp_open(path, f) return(ENOMEM); } - res = tftp_makereq(tftpfile, path); + res = tftp_makereq(tftpfile); if (res) { free(tftpfile->path); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193190 - head/share/misc
Author: avl (ports committer) Date: Sun May 31 22:33:53 2009 New Revision: 193190 URL: http://svn.freebsd.org/changeset/base/193190 Log: Add myself to the list of ports committers Approved by: tabthorpe (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot == --- head/share/misc/committers-ports.dotSun May 31 21:29:07 2009 (r193189) +++ head/share/misc/committers-ports.dotSun May 31 22:33:53 2009 (r193190) @@ -51,6 +51,7 @@ amdmi3 [label="Dmitry Marakasov\namdmi3@ anray [label="Andrey slusar\nan...@freebsd.org\n2005/12/11"] araujo [label="Marcelo araujo\nara...@freebsd.org\n2007/04/26"] arved [label="Tilman linneweh\nar...@freebsd.org\n2002/10/15"] +avl [label="Alexander logvinov\n...@freebsd.org\n2009/05/27"] az [label="Andrej zverev\...@freebsd.org\n2005/10/03"] beat [label="Beat gaetzi\nb...@freebsd.org\n2009/01/28"] beech [label="Beech rintoul\nbe...@freebsd.org\n2007/05/30"] @@ -229,6 +230,8 @@ garga -> vd garga -> wxs garga -> xride +glarkin -> avl + glewis -> hq glewis -> jkim @@ -322,6 +325,7 @@ stas -> araujo steve -> netchild +tabthorpe -> avl tabthorpe -> jadawin tabthorpe -> pgj ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193166 - in head/sys: kern net sys
Marko Zec wrote: Author: zec Date: Sun May 31 12:10:04 2009 New Revision: 193166 URL: http://svn.freebsd.org/changeset/base/193166 Log: Introduce an interm userland-kernel API for creating vnets and assigning ifnets from one vnet to another. Deletion of vnets is not yet supported. The interface is implemented as an ioctl extension so that no syscalls had to be introduced. This should be acceptable given that the new interface will be used for a short / interim period only, until the new jail management framwork gains the capability of managing vnets. This method for managing vimages / vnets has been in use for the past 7 years without any observable issues. The userland tool to be used in conjunction with the interim API can be found in p4: //depot/projects/vimage-commit2/src/usr.sbin/vimage/... and will most probably never get commited to svn. please check the tool into tools where it can be gotten too easily. in: http://svn.freebsd.org/viewvc/base/head/tools/tools/ we can remove them when we transition to the jamie's front-end. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r192925 - in head/sys/dev/usb: . input
Including Hans on the list. On 30 May 2009, at 22:18, Rui Paulo wrote: On 27 May 2009, at 20:27, Andrew Thompson wrote: Author: thompsa Date: Wed May 27 19:27:29 2009 New Revision: 192925 URL: http://svn.freebsd.org/changeset/base/192925 Log: Add support for the Apple MacBook Pro keyboard - add key mappings for fn keys - byte swapping for certain models - Fix leds for keyboards which require an ID byte for the HID output structures Submitted by: Hans Petter Selasky Oh, very nice! I've failed to do this with the old usb stack. This should work on a macbook too, right? The eject key was easily handled on user space (at least with the old usb stack). Why is it being handled in kernel now? Here's how it worked: http://wiki.freebsd.org/AppleMacbook#head-7eab3730c3bf3d04bdfb0d1d3649eaddf2fed595 If there's any problem with the userland approach, I would like to know. If there isn't, please consider removing the kenrel support for the eject key. I'm assuming this can be done on the new USB stack too (likely). Thanks. -- Rui Paulo PGP.sig Description: This is a digitally signed message part
svn commit: r193191 - head/sbin/mount_nfs
Author: rodrigc Date: Mon Jun 1 00:40:39 2009 New Revision: 193191 URL: http://svn.freebsd.org/changeset/base/193191 Log: Code for parsing nmount options in kernel was merged to stable/7 branch in r190315. So only resort to fallback_mount() could which passes struct nfs_args to kernel in kernel versions less than 702100. Modified: head/sbin/mount_nfs/mount_nfs.c Modified: head/sbin/mount_nfs/mount_nfs.c == --- head/sbin/mount_nfs/mount_nfs.c Sun May 31 22:33:53 2009 (r193190) +++ head/sbin/mount_nfs/mount_nfs.c Mon Jun 1 00:40:39 2009 (r193191) @@ -430,7 +430,7 @@ main(int argc, char *argv[]) * struct nfs_args to be passed in via nmount(). */ osversion = getosreldate(); - if (osversion >= 800048) { + if (osversion >= 702100) { if (nmount(iov, iovlen, mntflags)) err(1, "%s, %s", mntpath, errmsg); } else { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193192 - in head/sys: boot/common kern
Author: rodrigc Date: Mon Jun 1 01:02:30 2009 New Revision: 193192 URL: http://svn.freebsd.org/changeset/base/193192 Log: sys/boot/common.c = Extend the loader to parse the root file system mount options in /etc/fstab, and set a new loader variable vfs.root.mountfrom.options with these options. The root mount options must be a comma-delimited string, as specified in /etc/fstab. Only set the vfs.root.mountfrom.options variable if it has not been set in the environment. sys/kern/vfs_mount.c When mounting the root file system, pass the mount options specified in vfs.root.mountfrom.options, but filter out "rw" and "noro", since the initial mount of the root file system must be done as "ro". While we are here, try to add a few hints to the mountroot prompt to give users and idea what might of gone wrong during mounting of the root file system. Reviewed by: jhb (an earlier patch) Modified: head/sys/boot/common/boot.c head/sys/kern/vfs_mount.c Modified: head/sys/boot/common/boot.c == --- head/sys/boot/common/boot.c Mon Jun 1 00:40:39 2009(r193191) +++ head/sys/boot/common/boot.c Mon Jun 1 01:02:30 2009(r193192) @@ -287,7 +287,7 @@ getbootfile(int try) int getrootmount(char *rootdev) { -char lbuf[128], *cp, *ep, *dev, *fstyp; +char lbuf[128], *cp, *ep, *dev, *fstyp, *options; intfd, error; if (getenv("vfs.root.mountfrom") != NULL) @@ -331,11 +331,30 @@ getrootmount(char *rootdev) *cp = 0; fstyp = strdup(ep); - /* build the final result and save it */ + /* skip whitespace up to mount options */ + cp += 1; + while ((*cp != 0) && isspace(*cp)) + cp++; + if (*cp == 0) /* misformatted */ + continue; + /* skip text to end of mount options and delimit */ + ep = cp; + while ((*cp != 0) && !isspace(*cp)) + cp++; + *cp = 0; + options = strdup(ep); + /* Build the : and save it in vfs.root.mountfrom */ sprintf(lbuf, "%s:%s", fstyp, dev); free(dev); free(fstyp); setenv("vfs.root.mountfrom", lbuf, 0); + + /* Don't override vfs.root.mountfrom.options if it is already set */ + if (getenv("vfs.root.mountfrom.options") == NULL) { + /* save mount options */ + setenv("vfs.root.mountfrom.options", options, 0); + } + free(options); error = 0; break; } Modified: head/sys/kern/vfs_mount.c == --- head/sys/kern/vfs_mount.c Mon Jun 1 00:40:39 2009(r193191) +++ head/sys/kern/vfs_mount.c Mon Jun 1 01:02:30 2009(r193192) @@ -77,7 +77,7 @@ static void set_rootvnode(void); static int vfs_domount(struct thread *td, const char *fstype, char *fspath, int fsflags, void *fsdata); static int vfs_mountroot_ask(void); -static int vfs_mountroot_try(const char *mountfrom); +static int vfs_mountroot_try(const char *mountfrom, const char *options); static voidfree_mntarg(struct mntarg *ma); static int usermount = 0; @@ -110,6 +110,10 @@ struct vnode *rootvnode; * of being mounted as root * path := disk device name or other data used by the filesystem * to locate its physical store + * + * The environment variable vfs.root.mountfrom options is a comma delimited + * set of string mount options. These mount options must be parseable + * by nmount() in the kernel. */ /* @@ -1637,9 +1641,11 @@ vfs_opterror(struct vfsoptlist *opts, co void vfs_mountroot(void) { - char *cp; + char *cp, *options; int error, i, asked = 0; + options = NULL; + root_mount_prepare(); mount_zone = uma_zcreate("Mountpoints", sizeof(struct mount), @@ -1656,12 +1662,14 @@ vfs_mountroot(void) asked = 1; } + options = getenv("vfs.root.mountfrom.options"); + /* * The root filesystem information is compiled in, and we are * booted with instructions to use it. */ if (ctrootdevname != NULL && (boothowto & RB_DFLTROOT)) { - if (!vfs_mountroot_try(ctrootdevname)) + if (!vfs_mountroot_try(ctrootdevname, options)) goto mounted; ctrootdevname = NULL; } @@ -1673,7 +1681,7 @@ vfs_mountroot(void) */ if (boothowto & RB_CDROM) { for (i = 0; cdrom_rootdevnames[i] != NULL; i++) { - if (!vfs_mountroot_try(cdrom_rootdevnames[i])) + if (!vfs_mountroot_try(cdrom_rootdevnames[i], options)) goto mounted; } } @@ -1685,7 +1693,7 @
svn commit: r193194 - head/sys/dev/usb/wlan
Author: weongyo Date: Mon Jun 1 01:51:37 2009 New Revision: 193194 URL: http://svn.freebsd.org/changeset/base/193194 Log: ZyXEL G-202 has zd1211b chipset, not zd1211. Tested by:Samuel Boivie Modified: head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/usb/wlan/if_zyd.c == --- head/sys/dev/usb/wlan/if_zyd.c Mon Jun 1 01:42:56 2009 (r193193) +++ head/sys/dev/usb/wlan/if_zyd.c Mon Jun 1 01:51:37 2009 (r193194) @@ -232,7 +232,6 @@ static const struct usb_device_id zyd_de {USB_VPI(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_AG225H, ZYD_ZD1211)}, {USB_VPI(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_ZYAIRG220, ZYD_ZD1211)}, {USB_VPI(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_G200V2, ZYD_ZD1211)}, -{USB_VPI(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_G202, ZYD_ZD1211)}, /* ZYD_ZD1211B */ {USB_VPI(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_SMCWUSBG, ZYD_ZD1211B)}, {USB_VPI(USB_VENDOR_ACCTON, USB_PRODUCT_ACCTON_ZD1211B, ZYD_ZD1211B)}, @@ -252,6 +251,7 @@ static const struct usb_device_id zyd_de {USB_VPI(USB_VENDOR_ZCOM, USB_PRODUCT_ZCOM_ZD1211B, ZYD_ZD1211B)}, {USB_VPI(USB_VENDOR_ZYDAS, USB_PRODUCT_ZYDAS_ZD1211B, ZYD_ZD1211B)}, {USB_VPI(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_M202, ZYD_ZD1211B)}, +{USB_VPI(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_G202, ZYD_ZD1211B)}, {USB_VPI(USB_VENDOR_ZYXEL, USB_PRODUCT_ZYXEL_G220V2, ZYD_ZD1211B)}, }; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193195 - head/sys/modules/usb
Author: weongyo Date: Mon Jun 1 02:37:06 2009 New Revision: 193195 URL: http://svn.freebsd.org/changeset/base/193195 Log: connect urtw(4) to the amd64/i386 build that it's not tested on the big endian machines yet. Modified: head/sys/modules/usb/Makefile Modified: head/sys/modules/usb/Makefile == --- head/sys/modules/usb/Makefile Mon Jun 1 01:51:37 2009 (r193194) +++ head/sys/modules/usb/Makefile Mon Jun 1 02:37:06 2009 (r193195) @@ -27,7 +27,7 @@ SUBDIR = usb SUBDIR += ehci musb ohci uhci uss820dci ${_at91dci} ${_atmegadci} -SUBDIR += rum uath upgt ural zyd +SUBDIR += rum uath upgt ural zyd ${_urtw} SUBDIR += uhid ukbd ums udbp ufm SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ umct umodem umoscom uplcom uslcom uvisor uvscom @@ -35,9 +35,17 @@ SUBDIR += uether aue axe cdce cue kue ru SUBDIR += usfs umass urio SUBDIR += quirk template +.if ${MACHINE_ARCH} == "amd64" +_urtw= urtw +.endif + .if ${MACHINE_ARCH} == "arm" _at91dci= at91dci _atmegadci=atmegadci .endif +.if ${MACHINE_ARCH} == "i386" +_urtw= urtw +.endif + .include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193196 - in stable/7/sys: . amd64/linux32 compat/linux contrib/pf dev/ath/ath_hal dev/cxgb i386/linux
Author: dchagin Date: Mon Jun 1 04:44:43 2009 New Revision: 193196 URL: http://svn.freebsd.org/changeset/base/193196 Log: MFC r191741: Move extern variable definitions to the header file. Approved by: kib (mentor) Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/linux32/linux32_sysvec.c stable/7/sys/compat/linux/linux_futex.c stable/7/sys/compat/linux/linux_futex.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/linux/linux_sysvec.c Modified: stable/7/sys/amd64/linux32/linux32_sysvec.c == --- stable/7/sys/amd64/linux32/linux32_sysvec.c Mon Jun 1 02:37:06 2009 (r193195) +++ stable/7/sys/amd64/linux32/linux32_sysvec.c Mon Jun 1 04:44:43 2009 (r193196) @@ -75,6 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -126,9 +127,6 @@ static void exec_linux_setregs(struct th u_long stack, u_long ps_strings); static voidlinux32_fixlimit(struct rlimit *rl, int which); -extern LIST_HEAD(futex_list, futex) futex_list; -extern struct mtx futex_mtx; - static eventhandler_tag linux_exit_tag; static eventhandler_tag linux_schedtail_tag; static eventhandler_tag linux_exec_tag; Modified: stable/7/sys/compat/linux/linux_futex.c == --- stable/7/sys/compat/linux/linux_futex.c Mon Jun 1 02:37:06 2009 (r193195) +++ stable/7/sys/compat/linux/linux_futex.c Mon Jun 1 04:44:43 2009 (r193196) @@ -81,7 +81,7 @@ struct futex { TAILQ_HEAD(lf_waiting_proc, waiting_proc) f_waiting_proc; }; -LIST_HEAD(futex_list, futex) futex_list; +struct futex_list futex_list; #define FUTEX_LOCK(f) sx_xlock(&(f)->f_lck) #define FUTEX_UNLOCK(f)sx_xunlock(&(f)->f_lck) Modified: stable/7/sys/compat/linux/linux_futex.h == --- stable/7/sys/compat/linux/linux_futex.h Mon Jun 1 02:37:06 2009 (r193195) +++ stable/7/sys/compat/linux/linux_futex.h Mon Jun 1 04:44:43 2009 (r193196) @@ -36,6 +36,9 @@ #ifndef _LINUX_FUTEX_H #define _LINUX_FUTEX_H +extern LIST_HEAD(futex_list, futex) futex_list; +extern struct mtx futex_mtx; + #define LINUX_FUTEX_WAIT 0 #define LINUX_FUTEX_WAKE 1 #define LINUX_FUTEX_FD 2 /* unused */ Modified: stable/7/sys/i386/linux/linux_sysvec.c == --- stable/7/sys/i386/linux/linux_sysvec.c Mon Jun 1 02:37:06 2009 (r193195) +++ stable/7/sys/i386/linux/linux_sysvec.c Mon Jun 1 04:44:43 2009 (r193196) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -110,9 +111,6 @@ static register_t *linux_copyout_strings static int linux_szplatform; const char *linux_platform; -extern LIST_HEAD(futex_list, futex) futex_list; -extern struct mtx futex_mtx; - static eventhandler_tag linux_exit_tag; static eventhandler_tag linux_schedtail_tag; static eventhandler_tag linux_exec_tag; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193197 - head/etc/rc.d
Author: dougb Date: Mon Jun 1 04:55:13 2009 New Revision: 193197 URL: http://svn.freebsd.org/changeset/base/193197 Log: Substitute ypset for ypbind in REQUIRE lines. If you use ypset it has to happen right after ypbind, and before anything that uses NIS. The only change in rcorder accomplished by this patch is make that happen. PR: conf/117555 Submitted by: John Marshall Modified: head/etc/rc.d/amd head/etc/rc.d/keyserv head/etc/rc.d/nisdomain head/etc/rc.d/quota head/etc/rc.d/yppasswdd Modified: head/etc/rc.d/amd == --- head/etc/rc.d/amd Mon Jun 1 04:44:43 2009(r193196) +++ head/etc/rc.d/amd Mon Jun 1 04:55:13 2009(r193197) @@ -4,7 +4,7 @@ # # PROVIDE: amd -# REQUIRE: rpcbind ypbind nfsclient cleanvar ldconfig +# REQUIRE: rpcbind ypset nfsclient cleanvar ldconfig # BEFORE: DAEMON # KEYWORD: nojail shutdown Modified: head/etc/rc.d/keyserv == --- head/etc/rc.d/keyserv Mon Jun 1 04:44:43 2009(r193196) +++ head/etc/rc.d/keyserv Mon Jun 1 04:55:13 2009(r193197) @@ -6,7 +6,7 @@ # Start keyserv if we are running Secure RPC # PROVIDE: keyserv -# REQUIRE: ypbind +# REQUIRE: ypset # BEFORE: DAEMON # KEYWORD: shutdown Modified: head/etc/rc.d/nisdomain == --- head/etc/rc.d/nisdomain Mon Jun 1 04:44:43 2009(r193196) +++ head/etc/rc.d/nisdomain Mon Jun 1 04:55:13 2009(r193197) @@ -28,7 +28,7 @@ # PROVIDE: nisdomain # REQUIRE: SERVERS rpcbind -# BEFORE: ypbind ypserv ypxfrd +# BEFORE: ypset ypbind ypserv ypxfrd . /etc/rc.subr Modified: head/etc/rc.d/quota == --- head/etc/rc.d/quota Mon Jun 1 04:44:43 2009(r193196) +++ head/etc/rc.d/quota Mon Jun 1 04:55:13 2009(r193197) @@ -6,7 +6,7 @@ # Enable/Check the quotas (must be after ypbind if using NIS) # PROVIDE: quota -# REQUIRE: mountcritremote +# REQUIRE: mountcritremote ypset # BEFORE: DAEMON # KEYWORD: nojail Modified: head/etc/rc.d/yppasswdd == --- head/etc/rc.d/yppasswdd Mon Jun 1 04:44:43 2009(r193196) +++ head/etc/rc.d/yppasswdd Mon Jun 1 04:55:13 2009(r193197) @@ -4,7 +4,7 @@ # # PROVIDE: yppasswdd -# REQUIRE: ypserv ypbind +# REQUIRE: ypserv ypset # BEFORE: LOGIN # KEYWORD: shutdown ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193184 - in head/sys/dev/syscons: . teken
On Sun, May 31, 2009 at 07:35:41PM +, Ed Schouten wrote: > Author: ed > Date: Sun May 31 19:35:41 2009 > New Revision: 193184 > URL: http://svn.freebsd.org/changeset/base/193184 > > Log: > Restore support for bell pitch/duration. > > Because we only support a single argument to tf_param, use 16 bits for > the pitch and 16 bits for the duration. While there, make the argument > unsigned. There isn't a single param call that needs a signed integer. > > Submitted by: danfe (modified) Thanks! ./danfe ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193198 - head/etc/rc.d
Author: dougb Date: Mon Jun 1 05:35:03 2009 New Revision: 193198 URL: http://svn.freebsd.org/changeset/base/193198 Log: Make the pf and ipfw firewalls start before netif, just like ipfilter already does. This eliminates a logical inconsistency, and a small window where the system is open after the network comes up. Modified: head/etc/rc.d/ip6fw head/etc/rc.d/ipfilter head/etc/rc.d/ipfs head/etc/rc.d/ipfw head/etc/rc.d/ipnat head/etc/rc.d/netif head/etc/rc.d/network_ipv6 head/etc/rc.d/pf head/etc/rc.d/pflog head/etc/rc.d/pfsync Modified: head/etc/rc.d/ip6fw == --- head/etc/rc.d/ip6fw Mon Jun 1 04:55:13 2009(r193197) +++ head/etc/rc.d/ip6fw Mon Jun 1 05:35:03 2009(r193198) @@ -5,7 +5,6 @@ # PROVIDE: ip6fw # REQUIRE: routing -# BEFORE: network_ipv6 # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/ipfilter == --- head/etc/rc.d/ipfilter Mon Jun 1 04:55:13 2009(r193197) +++ head/etc/rc.d/ipfilter Mon Jun 1 05:35:03 2009(r193198) @@ -5,7 +5,6 @@ # PROVIDE: ipfilter # REQUIRE: FILESYSTEMS -# BEFORE: netif # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/ipfs == --- head/etc/rc.d/ipfs Mon Jun 1 04:55:13 2009(r193197) +++ head/etc/rc.d/ipfs Mon Jun 1 05:35:03 2009(r193198) @@ -5,7 +5,6 @@ # PROVIDE: ipfs # REQUIRE: ipnat -# BEFORE: netif # KEYWORD: nojail shutdown . /etc/rc.subr Modified: head/etc/rc.d/ipfw == --- head/etc/rc.d/ipfw Mon Jun 1 04:55:13 2009(r193197) +++ head/etc/rc.d/ipfw Mon Jun 1 05:35:03 2009(r193198) @@ -4,8 +4,7 @@ # # PROVIDE: ipfw -# REQUIRE: ppp -# BEFORE: NETWORKING +# REQUIRE: FILESYSTEMS # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/ipnat == --- head/etc/rc.d/ipnat Mon Jun 1 04:55:13 2009(r193197) +++ head/etc/rc.d/ipnat Mon Jun 1 05:35:03 2009(r193198) @@ -5,7 +5,6 @@ # PROVIDE: ipnat # REQUIRE: ipfilter -# BEFORE: DAEMON netif # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/netif == --- head/etc/rc.d/netif Mon Jun 1 04:55:13 2009(r193197) +++ head/etc/rc.d/netif Mon Jun 1 05:35:03 2009(r193198) @@ -26,7 +26,8 @@ # # PROVIDE: netif -# REQUIRE: atm1 cleanvar ipfilter FILESYSTEMS serial sppp sysctl +# REQUIRE: atm1 cleanvar FILESYSTEMS serial sppp sysctl +# REQUIRE: ipfilter ipfs pf ipfw # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/network_ipv6 == --- head/etc/rc.d/network_ipv6 Mon Jun 1 04:55:13 2009(r193197) +++ head/etc/rc.d/network_ipv6 Mon Jun 1 05:35:03 2009(r193198) @@ -29,7 +29,7 @@ # # PROVIDE: network_ipv6 -# REQUIRE: routing +# REQUIRE: routing ip6fw # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/pf == --- head/etc/rc.d/pfMon Jun 1 04:55:13 2009(r193197) +++ head/etc/rc.d/pfMon Jun 1 05:35:03 2009(r193198) @@ -4,7 +4,7 @@ # # PROVIDE: pf -# REQUIRE: FILESYSTEMS netif pflog pfsync +# REQUIRE: FILESYSTEMS pflog pfsync # BEFORE: routing # KEYWORD: nojail Modified: head/etc/rc.d/pflog == --- head/etc/rc.d/pflog Mon Jun 1 04:55:13 2009(r193197) +++ head/etc/rc.d/pflog Mon Jun 1 05:35:03 2009(r193198) @@ -4,7 +4,7 @@ # # PROVIDE: pflog -# REQUIRE: FILESYSTEMS netif cleanvar +# REQUIRE: FILESYSTEMS cleanvar # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/pfsync == --- head/etc/rc.d/pfsyncMon Jun 1 04:55:13 2009(r193197) +++ head/etc/rc.d/pfsyncMon Jun 1 05:35:03 2009(r193198) @@ -4,7 +4,7 @@ # # PROVIDE: pfsync -# REQUIRE: FILESYSTEMS netif +# REQUIRE: FILESYSTEMS # KEYWORD: nojail . /etc/rc.subr ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193199 - head/etc
Author: dougb Date: Mon Jun 1 05:37:13 2009 New Revision: 193199 URL: http://svn.freebsd.org/changeset/base/193199 Log: Eliminate the warning that "Values of network_interfaces other than AUTO are deprecated.' There is no good reason to deprecate them, and setting this to different values can be useful for custom solutions and/or one-off configuration problems. Modified: head/etc/network.subr Modified: head/etc/network.subr == --- head/etc/network.subr Mon Jun 1 05:35:03 2009(r193198) +++ head/etc/network.subr Mon Jun 1 05:37:13 2009(r193199) @@ -726,10 +726,6 @@ list_net_interfaces() _tmplist="${_lo}${_tmplist}" ;; *) - if [ -z "$type" ]; then - warn "Values of network_interfaces other than" \ - "AUTO are deprecated" - fi _tmplist="${network_interfaces} ${cloned_interfaces}" ;; esac ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193200 - stable/7/sbin/geom/class/journal
Author: maxim Date: Mon Jun 1 05:48:30 2009 New Revision: 193200 URL: http://svn.freebsd.org/changeset/base/193200 Log: MFC r192747: fix typo in the example. Modified: stable/7/sbin/geom/class/journal/gjournal.8 Modified: stable/7/sbin/geom/class/journal/gjournal.8 == --- stable/7/sbin/geom/class/journal/gjournal.8 Mon Jun 1 05:37:13 2009 (r193199) +++ stable/7/sbin/geom/class/journal/gjournal.8 Mon Jun 1 05:48:30 2009 (r193200) @@ -219,7 +219,7 @@ allows this (i.e., if the last sector is .Bd -literal -offset indent umount /dev/da0s1d gjournal label da0s1d da0s1e && \e -tunefs -J enable -n disable da01sd.journal && \e +tunefs -J enable -n disable da0s1d.journal && \e mount -o async /dev/da0s1d.journal /mnt || \e mount /dev/da0s1d /mnt .Ed ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193201 - head/sys/kern
Author: alc Date: Mon Jun 1 06:12:08 2009 New Revision: 193201 URL: http://svn.freebsd.org/changeset/base/193201 Log: Eliminate a comment describing code that was deleted over eight years ago. Move another comment to its proper place. Fix a typo in a third comment. Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c == --- head/sys/kern/vfs_bio.c Mon Jun 1 05:48:30 2009(r193200) +++ head/sys/kern/vfs_bio.c Mon Jun 1 06:12:08 2009(r193201) @@ -638,13 +638,6 @@ bufinit(void) hifreebuffers = 2 * lofreebuffers; numfreebuffers = nbuf; -/* - * Maximum number of async ops initiated per buf_daemon loop. This is - * somewhat of a hack at the moment, we really need to limit ourselves - * based on the number of bytes of I/O in-transit that were initiated - * from buf_daemon. - */ - bogus_page = vm_page_alloc(NULL, 0, VM_ALLOC_NOOBJ | VM_ALLOC_NORMAL | VM_ALLOC_WIRED); } @@ -1202,7 +1195,7 @@ brelse(struct buf *bp) /* * Failed write, redirty. Must clear BIO_ERROR to prevent * pages from being scrapped. If the error is anything -* other than an I/O error (EIO), assume that retryingi +* other than an I/O error (EIO), assume that retrying * is futile. */ bp->b_ioflags &= ~BIO_ERROR; @@ -2403,15 +2396,9 @@ vfs_setdirty(struct buf *bp) /* * Degenerate case - empty buffer */ - if (bp->b_bufsize == 0) return; - /* -* We qualify the scan for modified pages on whether the -* object has been flushed yet. -*/ - if ((bp->b_flags & B_VMIO) == 0) return; @@ -2428,6 +2415,11 @@ vfs_setdirty_locked_object(struct buf *b object = bp->b_bufobj->bo_object; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); + + /* +* We qualify the scan for modified pages on whether the +* object has been flushed yet. +*/ if (object->flags & (OBJ_MIGHTBEDIRTY|OBJ_CLEANING)) { vm_offset_t boffset; vm_offset_t eoffset; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193198 - head/etc/rc.d
On Mon, 1 Jun 2009, Doug Barton wrote: Author: dougb Date: Mon Jun 1 05:35:03 2009 New Revision: 193198 URL: http://svn.freebsd.org/changeset/base/193198 Log: Make the pf and ipfw firewalls start before netif, just like ipfilter already does. This eliminates a logical inconsistency, and a small window where the system is open after the network comes up. Unfortunetaly this is contrary to a lot of PRs and requests on mailing lists out there that actually want the netif/network_ipv6 to be run _before_ things come up. Espescially pf really needs this to avoid rules that needs to do per paket lookups of the interface address. Further ipfw has a default option being setaable at compile time and as TUNABLE to handle this window. -- Bjoern A. Zeeb The greatest risk is not taking one. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193202 - head/contrib/bind9/lib/isc/ia64/include/isc
Author: dougb Date: Mon Jun 1 06:31:04 2009 New Revision: 193202 URL: http://svn.freebsd.org/changeset/base/193202 Log: Local hack to get the build going again while ISC works on a more permanent solution for 9.6.1-release. "My suggestion is to remove the whole attribute construct. It only suppresses a warning when a function is unused. In this case the function is defined as inline, so it's not causing a warning when not used." Submitted by: marcel Modified: head/contrib/bind9/lib/isc/ia64/include/isc/atomic.h Modified: head/contrib/bind9/lib/isc/ia64/include/isc/atomic.h == --- head/contrib/bind9/lib/isc/ia64/include/isc/atomic.hMon Jun 1 06:12:08 2009(r193201) +++ head/contrib/bind9/lib/isc/ia64/include/isc/atomic.hMon Jun 1 06:31:04 2009(r193202) @@ -32,9 +32,6 @@ */ static inline isc_int32_t isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) -#ifdef __GNUC__ -__attribute__ ((unused)) -#endif { isc_int32_t prev, swapped; @@ -58,9 +55,6 @@ __attribute__ ((unused)) */ static inline void isc_atomic_store(isc_int32_t *p, isc_int32_t val) -#ifdef __GNUC__ -__attribute__ ((unused)) -#endif { __asm__ volatile( "st4.rel %0=%1" @@ -77,9 +71,6 @@ __attribute__ ((unused)) */ static inline isc_int32_t isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) -#ifdef __GNUC__ -__attribute__ ((unused)) -#endif { isc_int32_t ret; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193198 - head/etc/rc.d
On Monday 01 June 2009 07:35:03 Doug Barton wrote: > Author: dougb > Date: Mon Jun 1 05:35:03 2009 > New Revision: 193198 > URL: http://svn.freebsd.org/changeset/base/193198 > > Log: > Make the pf and ipfw firewalls start before netif, just like ipfilter > already does. This eliminates a logical inconsistency, and a small > window where the system is open after the network comes up. Can you please add a note about this in UPDATING? It might be a slight POLA violation for people who rely on the interfaces being configured to setup the firewall. For instance when one doesn't use dynamic address rules in pf i.e. "from/to ifX" instead of "from/to (ifX)". > Modified: > head/etc/rc.d/ip6fw > head/etc/rc.d/ipfilter > head/etc/rc.d/ipfs > head/etc/rc.d/ipfw > head/etc/rc.d/ipnat > head/etc/rc.d/netif > head/etc/rc.d/network_ipv6 > head/etc/rc.d/pf > head/etc/rc.d/pflog > head/etc/rc.d/pfsync -- /"\ Best regards, | mla...@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mla...@efnet / \ ASCII Ribbon Campaign | Against HTML Mail and News ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r193199 - head/etc
On Mon, 1 Jun 2009, Doug Barton wrote: Author: dougb Date: Mon Jun 1 05:37:13 2009 New Revision: 193199 URL: http://svn.freebsd.org/changeset/base/193199 Log: Eliminate the warning that "Values of network_interfaces other than AUTO are deprecated.' There is no good reason to deprecate them, and setting this to different values can be useful for custom solutions and/or one-off configuration problems. There used to be adisucssion about this last year. I think you would have wanted to talk to brooks before who had put this in: http://lists.freebsd.org/pipermail/cvs-all/2008-July/thread.html#263409 Modified: head/etc/network.subr Modified: head/etc/network.subr == --- head/etc/network.subr Mon Jun 1 05:35:03 2009(r193198) +++ head/etc/network.subr Mon Jun 1 05:37:13 2009(r193199) @@ -726,10 +726,6 @@ list_net_interfaces() _tmplist="${_lo}${_tmplist}" ;; *) - if [ -z "$type" ]; then - warn "Values of network_interfaces other than" \ - "AUTO are deprecated" - fi _tmplist="${network_interfaces} ${cloned_interfaces}" ;; esac -- Bjoern A. Zeeb The greatest risk is not taking one. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r192925 - in head/sys/dev/usb: . input
On Monday 01 June 2009, Rui Paulo wrote: > http://wiki.freebsd.org/AppleMacbook#head-7eab3730c3bf3d04bdfb0d1d3649eaddf >2fed595 Hi Rui Paulo, Regarding the eject button, can you have a look at: /sys/dev/usb/input/ukbd.c And provide a patch that masks this key the way you want? Debugging: sysctl hw.usb.ukbd.debug=15 --HPS ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r193203 - head/usr.sbin/tcpdrop
Author: jmallett Date: Mon Jun 1 06:49:09 2009 New Revision: 193203 URL: http://svn.freebsd.org/changeset/base/193203 Log: o) Restructure tcpdrop(8) to provide a facility to try to drop all established connections. Including a flag to instead output a sequence of tcpdrop(8) invocations that would accomplish the same thing, which is convenient for scripting. o) Make tcpdrop complain if the addresses given to it are entirely in different address families, rather than failing silently. o) When cross-referencing httpd(8), do not explicitly specify the apache2 port, since the example in question is generic. Modified: head/usr.sbin/tcpdrop/tcpdrop.8 head/usr.sbin/tcpdrop/tcpdrop.c Modified: head/usr.sbin/tcpdrop/tcpdrop.8 == --- head/usr.sbin/tcpdrop/tcpdrop.8 Mon Jun 1 06:31:04 2009 (r193202) +++ head/usr.sbin/tcpdrop/tcpdrop.8 Mon Jun 1 06:49:09 2009 (r193203) @@ -1,5 +1,6 @@ .\"$OpenBSD: tcpdrop.8,v 1.5 2004/05/24 13:57:31 jmc Exp $ .\" +.\" Copyright (c) 2009 Juli Mallett .\" Copyright (c) 2004 Markus Friedl .\" .\" Permission to use, copy, modify, and distribute this software for any @@ -16,35 +17,58 @@ .\" .\" $FreeBSD$ .\" -.Dd March 21, 2004 +.Dd March 24, 2009 .Dt TCPDROP 8 .Os .Sh NAME .Nm tcpdrop -.Nd drop a TCP connection +.Nd drop TCP connections .Sh SYNOPSIS .Nm tcpdrop -.Ar laddr -.Ar lport -.Ar faddr -.Ar fport +.Ar local-address +.Ar local-port +.Ar foreign-address +.Ar foreign-port +.Nm tcpdrop +.Op Fl l +.Fl a .Sh DESCRIPTION The .Nm -command drops the TCP connection specified by the local address -.Ar laddr , +command may be used to drop TCP connections from the command line. +.Pp +If +.Fl a +is specified then +.Nm +will attempt to drop all active connections. +The +.Fl l +flag may be given to list the tcpdrop invocation to drop all active +connections one at a time. +.Pp +If +.Fl a +is not specified then only the connection between the given local +address +.Ar local-address , port -.Ar lport +.Ar local-port , and the foreign address -.Ar faddr , +.Ar foreign-address , port -.Ar fport . -Addresses and ports can be specified by name or numeric value. +.Ar foreign-port , +will be dropped. +.Pp +Addresses and ports may be specified by name or numeric value. +Both IPv4 and IPv6 address formats are supported. +.Nm +in case of success or failure. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES If a connection to -.Xr httpd 8 Pq Pa ports/www/apache2 +.Xr httpd 8 is causing congestion on a network link, one can drop the TCP session in charge: .Bd -literal -offset indent @@ -57,8 +81,16 @@ The following command will drop the conn .Bd -literal -offset indent # tcpdrop 192.168.5.41 80 192.168.5.1 26747 .Ed +.Pp +The following command will drop all connections but those to or from +port 22, the port used by +.Xr sshd 8 : +.Bd -literal -offset indent +# tcpdrop -l -a | grep -vw 22 | sh +.Ed .Sh SEE ALSO .Xr netstat 1 , .Xr sockstat 1 .Sh AUTHORS .An Markus Friedl Aq mar...@openbsd.org +.An Juli Mallett Aq jmall...@freebsd.org Modified: head/usr.sbin/tcpdrop/tcpdrop.c == --- head/usr.sbin/tcpdrop/tcpdrop.c Mon Jun 1 06:31:04 2009 (r193202) +++ head/usr.sbin/tcpdrop/tcpdrop.c Mon Jun 1 06:49:09 2009 (r193203) @@ -1,6 +1,7 @@ /* $OpenBSD: tcpdrop.c,v 1.4 2004/05/22 23:55:22 deraadt Exp $ */ /*- + * Copyright (c) 2009 Juli Mallett * Copyright (c) 2004 Markus Friedl * * Permission to use, copy, modify, and distribute this software for any @@ -21,15 +22,41 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include + +#include +#define TCPSTATES +#include #include #include #include +#include #include #include #include +#include + +#defineTCPDROP_FOREIGN 0 +#defineTCPDROP_LOCAL 1 + +struct host_service { + char hs_host[NI_MAXHOST]; + char hs_service[NI_MAXSERV]; +}; + +static bool tcpdrop_list_commands = false; + +static struct xinpgen *getxpcblist(const char *); +static void sockinfo(const struct sockaddr *, struct host_service *); +static bool tcpdrop(const struct sockaddr *, const struct sockaddr *); +static bool tcpdropall(void); +static bool tcpdropbyname(const char *, const char *, const char *, +const char *); +static bool tcpdropconn(const struct in_conninfo *); +static void usage(void); /* * Drop a tcp connection. @@ -37,55 +64,259 @@ __FBSDID("$FreeBSD$"); int main(int argc, char *argv[]) { - struct addrinfo hints, *ail, *aif, *laddr, *faddr; - /* addrs[0] is a foreign socket, addrs[1] is a local one. */ - struct sockaddr_storage addrs[2]; - int mib[] = { CTL_NET, PF_INET, IPPROTO_TCP, TCPCTL_DROP }; - int gaierr, rval = 0; - char fhbuf[NI_MAXHOST], fsbuf[NI_MAXSERV], lhbuf[NI_MAXHOST
svn commit: r193204 - head/share/man/man4
Author: jmallett Date: Mon Jun 1 06:52:03 2009 New Revision: 193204 URL: http://svn.freebsd.org/changeset/base/193204 Log: o) Remove some references to long-unsupported old-style config(8) directives. o) Borrow da(4) language about autoconfiguration for ch(4). Modified: head/share/man/man4/ch.4 head/share/man/man4/scsi.4 Modified: head/share/man/man4/ch.4 == --- head/share/man/man4/ch.4Mon Jun 1 06:49:09 2009(r193203) +++ head/share/man/man4/ch.4Mon Jun 1 06:52:03 2009(r193204) @@ -32,7 +32,6 @@ .Nd SCSI media-changer (juke box) driver .Sh SYNOPSIS .Cd device ch -.Cd device ch1 target 4 unit 0 .Sh DESCRIPTION The .Nm @@ -67,13 +66,12 @@ come on line as; refer to .Xr scsi 4 for details on kernel configuration. .Sh KERNEL CONFIGURATION -In configuring, if an optional -.Ar count -is given in the specification, that number of SCSI media changers -are configured; Most storage for them is allocated only when found -so a large number of configured devices is cheap. -(once the first -has included the driver). +It is only necessary to explicitly configure one +.Nm +device; data structures are dynamically allocated as media changes are found +on the +.Tn SCSI +bus. .Sh IOCTLS User mode programs communicate with the changer driver through a number of ioctls which are described below. Modified: head/share/man/man4/scsi.4 == --- head/share/man/man4/scsi.4 Mon Jun 1 06:49:09 2009(r193203) +++ head/share/man/man4/scsi.4 Mon Jun 1 06:52:03 2009(r193204) @@ -150,7 +150,7 @@ will be reset to 100ms. .Pp All devices and the SCSI busses support boot time allocation so that an upper number of devices and controllers does not need to be configured; -.Cd "device da0" +.Cd "device da" will suffice for any number of disk drivers. .Pp The devices are either ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"