svn commit: r216754 - head/sys/geom/part
Author: ae Date: Tue Dec 28 08:36:44 2010 New Revision: 216754 URL: http://svn.freebsd.org/changeset/base/216754 Log: Make EBR probe method less strictly to be able detect EBRs with small non fatal inconsistency. EBR may contain boot loader and sometimes it just has some garbage data. Now this does not prevent FreeBSD to use extended partitions. But since we do not support bootcode for EBR we mark tables which have non empty boot area as corrupt. This does make them readonly and we can not damage this data. PR: kern/141235 MFC after:1 month Modified: head/sys/geom/part/g_part_ebr.c Modified: head/sys/geom/part/g_part_ebr.c == --- head/sys/geom/part/g_part_ebr.c Tue Dec 28 03:27:20 2010 (r216753) +++ head/sys/geom/part/g_part_ebr.c Tue Dec 28 08:36:44 2010 (r216754) @@ -377,7 +377,7 @@ g_part_ebr_probe(struct g_part_table *ta char psn[8]; struct g_provider *pp; u_char *buf, *p; - int error, index, res, sum; + int error, index, res; uint16_t magic; pp = cp->provider; @@ -409,29 +409,11 @@ g_part_ebr_probe(struct g_part_table *ta if (magic != DOSMAGIC) goto out; - /* -* The sector is all zeroes, except for the partition entries, -* pseudo boot code and some signatures or disk serial number. -* The latter can be found in the 9 bytes immediately in front -* of the partition table. -*/ - sum = 0; - for (index = 96; index < DOSPARTOFF - 9; index++) - sum += buf[index]; - if (sum != 0) - goto out; - - for (index = 0; index < NDOSPART; index++) { + for (index = 0; index < 2; index++) { p = buf + DOSPARTOFF + index * DOSPARTSIZE; if (p[0] != 0 && p[0] != 0x80) goto out; - if (index < 2) - continue; - /* The 3rd & 4th entries are always zero. */ - if ((le64dec(p+0) + le64dec(p+8)) != 0) - goto out; } - res = G_PART_PROBE_PRI_NORM; out: @@ -450,7 +432,7 @@ g_part_ebr_read(struct g_part_table *bas u_char *buf; off_t ofs, msize; u_int lba; - int error, index; + int error, index, sum; pp = cp->provider; table = (struct g_part_ebr_table *)basetable; @@ -465,6 +447,28 @@ g_part_ebr_read(struct g_part_table *bas ebr_entry_decode(buf + DOSPARTOFF + 0 * DOSPARTSIZE, ent + 0); ebr_entry_decode(buf + DOSPARTOFF + 1 * DOSPARTSIZE, ent + 1); + + /* The 3rd & 4th entries should be zeroes. */ + if (le64dec(buf + DOSPARTOFF + 2 * DOSPARTSIZE) + + le64dec(buf + DOSPARTOFF + 3 * DOSPARTSIZE) != 0) { + basetable->gpt_corrupt = 1; + printf("GEOM: %s: invalid entries in the EBR ignored.\n", + pp->name); + } + /* We do not support bootcode for EBR. If bootcode area is +* not zeroes, then mark this EBR as corrupt to do not break +* anything for another OS'es. +*/ + if (lba == 0) { + sum = 0; + for (index = 0; index < DOSPARTOFF; index++) + sum += buf[index]; + if (sum != 0) { + basetable->gpt_corrupt = 1; + printf("GEOM: %s: EBR has non empty bootcode.\n", + pp->name); + } + } g_free(buf); if (ent[0].dp_typ == 0) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216755 - head/sys/geom/part
Author: ae Date: Tue Dec 28 08:42:12 2010 New Revision: 216755 URL: http://svn.freebsd.org/changeset/base/216755 Log: Allow destroying EBR in COMPAT (default) mode. MFC after:2 week Modified: head/sys/geom/part/g_part_ebr.c Modified: head/sys/geom/part/g_part_ebr.c == --- head/sys/geom/part/g_part_ebr.c Tue Dec 28 08:36:44 2010 (r216754) +++ head/sys/geom/part/g_part_ebr.c Tue Dec 28 08:42:12 2010 (r216755) @@ -357,6 +357,8 @@ g_part_ebr_precheck(struct g_part_table struct g_part_parms *gpp) { #if defined(GEOM_PART_EBR_COMPAT) + if (req == G_PART_CTL_DESTROY) + return (0); return (ECANCELED); #else /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216756 - in head: lib/libc/locale lib/libc/rpc lib/libkvm usr.bin/c89 usr.bin/c99 usr.bin/tar usr.sbin/ancontrol
Author: uqs Date: Tue Dec 28 10:08:50 2010 New Revision: 216756 URL: http://svn.freebsd.org/changeset/base/216756 Log: Revert most of r210764, now that mdocml does the right thing with empty quotation macros. Requested by: Alex Kozlov Modified: head/lib/libc/locale/mbrtowc.3 head/lib/libc/rpc/publickey.3 head/lib/libkvm/kvm_getloadavg.3 head/usr.bin/c89/c89.1 head/usr.bin/c99/c99.1 head/usr.bin/tar/bsdtar.1 head/usr.sbin/ancontrol/ancontrol.8 Modified: head/lib/libc/locale/mbrtowc.3 == --- head/lib/libc/locale/mbrtowc.3 Tue Dec 28 08:42:12 2010 (r216755) +++ head/lib/libc/locale/mbrtowc.3 Tue Dec 28 10:08:50 2010 (r216756) @@ -69,7 +69,7 @@ was .Dv NULL , .Fa s was an empty string -.Pq Qq \& +.Pq Qq and .Fa n was 1. Modified: head/lib/libc/rpc/publickey.3 == --- head/lib/libc/rpc/publickey.3 Tue Dec 28 08:42:12 2010 (r216755) +++ head/lib/libc/rpc/publickey.3 Tue Dec 28 10:08:50 2010 (r216756) @@ -44,7 +44,7 @@ fails to decrypt the secret key, the rou argument will be a .Dv NULL string -.Pq Dq \& . +.Pq Dq . .Sh SEE ALSO .Xr publickey 5 .Pp Modified: head/lib/libkvm/kvm_getloadavg.3 == --- head/lib/libkvm/kvm_getloadavg.3Tue Dec 28 08:42:12 2010 (r216755) +++ head/lib/libkvm/kvm_getloadavg.3Tue Dec 28 10:08:50 2010 (r216756) @@ -50,7 +50,7 @@ averaged over various periods of time. Up to .Fa nelem samples are retrieved and assigned to successive elements of -.Fa loadavg Ns Bq \& . +.Fa loadavg Ns Bq . The system imposes a maximum of 3 samples, representing averages over the last 1, 5, and 15 minutes, respectively. .Sh DIAGNOSTICS Modified: head/usr.bin/c89/c89.1 == --- head/usr.bin/c89/c89.1 Tue Dec 28 08:42:12 2010(r216755) +++ head/usr.bin/c89/c89.1 Tue Dec 28 10:08:50 2010(r216756) @@ -94,7 +94,7 @@ absolute pathnames to look in the direct pathname before looking in the usual places. Thus, headers whose names are enclosed in double-quotes -.Pq Qq \& +.Pq Qq will be searched for first in the directory of the file with the .Ic #include @@ -103,7 +103,7 @@ directories named in .Fl I options, and last in the usual places. For headers whose names are enclosed in angle brackets -.Pq Aq \& , +.Pq Aq , the header will be searched for only in directories named in .Fl I Modified: head/usr.bin/c99/c99.1 == --- head/usr.bin/c99/c99.1 Tue Dec 28 08:42:12 2010(r216755) +++ head/usr.bin/c99/c99.1 Tue Dec 28 10:08:50 2010(r216756) @@ -96,7 +96,7 @@ absolute pathnames to look in the direct pathname before looking in the usual places. Thus, headers whose names are enclosed in double-quotes -.Pq Qq \& +.Pq Qq will be searched for first in the directory of the file with the .Ic #include @@ -105,7 +105,7 @@ directories named in .Fl I options, and last in the usual places. For headers whose names are enclosed in angle brackets -.Pq Aq \& , +.Pq Aq , the header will be searched for only in directories named in .Fl I Modified: head/usr.bin/tar/bsdtar.1 == --- head/usr.bin/tar/bsdtar.1 Tue Dec 28 08:42:12 2010(r216755) +++ head/usr.bin/tar/bsdtar.1 Tue Dec 28 10:08:50 2010(r216756) @@ -354,9 +354,9 @@ is run as non-root. .It Fl Fl numeric-owner This is equivalent to .Fl Fl uname -.Qq \& +.Qq .Fl Fl gname -.Qq \& . +.Qq . On extract, it causes user and group names in the archive to be ignored in favor of the numeric user and group ids. On create, it causes user and group names to not be stored Modified: head/usr.sbin/ancontrol/ancontrol.8 == --- head/usr.sbin/ancontrol/ancontrol.8 Tue Dec 28 08:42:12 2010 (r216755) +++ head/usr.sbin/ancontrol/ancontrol.8 Tue Dec 28 10:08:50 2010 (r216756) @@ -308,7 +308,7 @@ Set a WEP key. For 40 bit prefix 10 hex character with 0x. For 128 bit prefix 26 hex character with 0x. Use -.Qq \& +.Qq as the key to erase the key. Supports 4 keys; even numbers are for permanent keys and odd number are for temporary keys. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216758 - in head: . sys/netinet sys/sys
Author: lstewart Date: Tue Dec 28 12:13:30 2010 New Revision: 216758 URL: http://svn.freebsd.org/changeset/base/216758 Log: - Add some helper hook points to the TCP stack. The hooks allow Khelp modules to access inbound/outbound events and associated data for established TCP connections. The hooks only run if at least one hook function is registered for the hook point, ensuring the impact on the stack is effectively nil when no TCP Khelp modules are loaded. struct tcp_hhook_data is passed as contextual data to any registered Khelp module hook functions. - Add an OSD (Object Specific Data) pointer to struct tcpcb to allow Khelp modules to associate per-connection data with the TCP control block. - Bump __FreeBSD_version and add a note to UPDATING regarding to ABI changes introduced by this commit and r216753. In collaboration with:David Hayes and Grenville Armitage Sponsored by: FreeBSD Foundation Reviewed by: bz, others along the way MFC after:3 months Modified: head/UPDATING head/sys/netinet/tcp_input.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_var.h head/sys/sys/param.h Modified: head/UPDATING == --- head/UPDATING Tue Dec 28 11:34:59 2010(r216757) +++ head/UPDATING Tue Dec 28 12:13:30 2010(r216758) @@ -22,6 +22,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 9. machines to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20101228: + The TCP stack has been modified to allow Khelp modules to interact with + it via helper hook points and store per-connection data in the TCP + control block. Bump __FreeBSD_version to 900029. User space tools that + rely on the size of struct tcpcb in tcp_var.h (e.g. sockstat) need to + be recompiled. + 20101114: Generic IEEE 802.3 annex 31B full duplex flow control support has been added to mii(4) and bge(4), bce(4), msk(4), nfe(4) and stge(4) along Modified: head/sys/netinet/tcp_input.c == --- head/sys/netinet/tcp_input.cTue Dec 28 11:34:59 2010 (r216757) +++ head/sys/netinet/tcp_input.cTue Dec 28 12:13:30 2010 (r216758) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include /* for proc0 declaration */ @@ -218,6 +219,8 @@ static void inline cc_ack_received(struc uint16_t type); static void inline cc_conn_init(struct tcpcb *tp); static void inline cc_post_recovery(struct tcpcb *tp, struct tcphdr *th); +static void inline hhook_run_tcp_est_in(struct tcpcb *tp, + struct tcphdr *th, struct tcpopt *to); /* * Kernel module interface for updating tcpstat. The argument is an index @@ -234,6 +237,24 @@ kmod_tcpstat_inc(int statnum) } /* + * Wrapper for the TCP established input helper hook. + */ +static void inline +hhook_run_tcp_est_in(struct tcpcb *tp, struct tcphdr *th, struct tcpopt *to) +{ + struct tcp_hhook_data hhook_data; + + if (V_tcp_hhh[HHOOK_TCP_EST_IN]->hhh_nhooks > 0) { + hhook_data.tp = tp; + hhook_data.th = th; + hhook_data.to = to; + + hhook_run_hooks(V_tcp_hhh[HHOOK_TCP_EST_IN], &hhook_data, + tp->osd); + } +} + +/* * CC wrapper hook functions */ static void inline @@ -1486,6 +1507,10 @@ tcp_do_segment(struct mbuf *m, struct tc ticks - tp->t_rtttime); } acked = BYTES_THIS_ACK(tp, th); + + /* Run HHOOK_TCP_ESTABLISHED_IN helper hooks. */ + hhook_run_tcp_est_in(tp, th, &to); + TCPSTAT_INC(tcps_rcvackpack); TCPSTAT_ADD(tcps_rcvackbyte, acked); sbdrop(&so->so_snd, acked); @@ -2199,6 +2224,10 @@ tcp_do_segment(struct mbuf *m, struct tc ((to.to_flags & TOF_SACK) || !TAILQ_EMPTY(&tp->snd_holes))) tcp_sack_doack(tp, &to, th->th_ack); + + /* Run HHOOK_TCP_ESTABLISHED_IN helper hooks. */ + hhook_run_tcp_est_in(tp, th, &to); + if (SEQ_LEQ(th->th_ack, tp->snd_una)) { if (tlen == 0 && tiwin == tp->snd_wnd) { TCPSTAT_INC(tcps_rcvdupack); Modified: head/sys/netinet/tcp_output.c == --- head/sys/netinet/tcp_ou
svn commit: r216760 - head/sys/netinet
Author: lstewart Date: Tue Dec 28 12:37:57 2010 New Revision: 216760 URL: http://svn.freebsd.org/changeset/base/216760 Log: Add a comment for the ccv member of struct tcpcb. Sponsored by: FreeBSD Foundation MFC after:5 weeks X-MFC with: r215166 Modified: head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_var.h == --- head/sys/netinet/tcp_var.h Tue Dec 28 12:18:46 2010(r216759) +++ head/sys/netinet/tcp_var.h Tue Dec 28 12:37:57 2010(r216760) @@ -200,7 +200,7 @@ struct tcpcb { void*t_toe; /* TOE pcb pointer */ int t_bytes_acked; /* # bytes acked during current RTT */ struct cc_algo *cc_algo; /* congestion control algorithm */ - struct cc_var *ccv; + struct cc_var *ccv; /* congestion control specific vars */ struct osd *osd; /* storage for Khelp module data */ int t_ispare; /* explicit pad for 64bit alignment */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216761 - in head: bin/sh tools/regression/bin/sh/expansion
Author: jilles Date: Tue Dec 28 13:28:24 2010 New Revision: 216761 URL: http://svn.freebsd.org/changeset/base/216761 Log: sh: Make expansion errors in optimized command substitution non-fatal. Command substitutions consisting of a single simple command are executed in the main shell process but this should be invisible apart from performance and very few exceptions such as $(trap). Added: head/tools/regression/bin/sh/expansion/cmdsubst5.0 (contents, props changed) Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c == --- head/bin/sh/eval.c Tue Dec 28 12:37:57 2010(r216760) +++ head/bin/sh/eval.c Tue Dec 28 13:28:24 2010(r216761) @@ -578,6 +578,8 @@ evalbackcmd(union node *n, struct backcm int pip[2]; struct job *jp; struct stackmark smark; /* unnecessary */ + struct jmploc jmploc; + struct jmploc *savehandler; setstackmark(&smark); result->fd = -1; @@ -590,7 +592,19 @@ evalbackcmd(union node *n, struct backcm } if (n->type == NCMD) { exitstatus = oexitstatus; - evalcommand(n, EV_BACKCMD, result); + savehandler = handler; + if (setjmp(jmploc.loc)) { + if (exception == EXERROR || exception == EXEXEC) + exitstatus = 2; + else if (exception != 0) { + handler = savehandler; + longjmp(handler->loc, 1); + } + } else { + handler = &jmploc; + evalcommand(n, EV_BACKCMD, result); + } + handler = savehandler; } else { exitstatus = 0; if (pipe(pip) < 0) Added: head/tools/regression/bin/sh/expansion/cmdsubst5.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/cmdsubst5.0 Tue Dec 28 13:28:24 2010(r216761) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +unset v +exec 2>/dev/null +! y=$(: ${v?}) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r216694 - head/libexec/rtld-elf
On Sat, 25.12.2010 at 08:42:38 +, Konstantin Belousov wrote: > Author: kib > Date: Sat Dec 25 08:42:38 2010 > New Revision: 216694 > URL: http://svn.freebsd.org/changeset/base/216694 > > Log: > Add a hook to pass debug flags to the build of rtld when doing make in > the rtld directory. > > Reviewed by:kan Please revert this, $(VAR) is against style, and passing DEBUG_FLAGS is the canonical way to achieve what you wanted, eg. make DEBUG_FLAGS=-g is working just fine for me. > Modified: > head/libexec/rtld-elf/Makefile > > Modified: head/libexec/rtld-elf/Makefile > == > --- head/libexec/rtld-elf/MakefileFri Dec 24 21:31:18 2010 > (r216693) > +++ head/libexec/rtld-elf/MakefileSat Dec 25 08:42:38 2010 > (r216694) > @@ -34,7 +34,7 @@ CFLAGS+=-fPIC > .else > CFLAGS+= -fpic > .endif > -CFLAGS+= -DPIC > +CFLAGS+= -DPIC $(DEBUG) > LDFLAGS+=-shared -Wl,-Bsymbolic > DPADD= ${LIBC_PIC} > LDADD= -lc_pic -lssp_nonshared ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r216694 - head/libexec/rtld-elf
On Tue, Dec 28, 2010 at 02:29:43PM +0100, Ulrich Sp??rlein wrote: > On Sat, 25.12.2010 at 08:42:38 +, Konstantin Belousov wrote: > > Author: kib > > Date: Sat Dec 25 08:42:38 2010 > > New Revision: 216694 > > URL: http://svn.freebsd.org/changeset/base/216694 > > > > Log: > > Add a hook to pass debug flags to the build of rtld when doing make in > > the rtld directory. > > > > Reviewed by: kan > > Please revert this, $(VAR) is against style, and passing DEBUG_FLAGS is > the canonical way to achieve what you wanted, eg. make DEBUG_FLAGS=-g is > working just fine for me. DEBUG_FLAGS=-g might be fine for you, but it does not do what rtld debugging needs. Look at the -DDEBUG. If you want ${} instead of $(), feel free to change. > > > Modified: > > head/libexec/rtld-elf/Makefile > > > > Modified: head/libexec/rtld-elf/Makefile > > == > > --- head/libexec/rtld-elf/Makefile Fri Dec 24 21:31:18 2010 > > (r216693) > > +++ head/libexec/rtld-elf/Makefile Sat Dec 25 08:42:38 2010 > > (r216694) > > @@ -34,7 +34,7 @@ CFLAGS+= -fPIC > > .else > > CFLAGS+= -fpic > > .endif > > -CFLAGS+= -DPIC > > +CFLAGS+= -DPIC $(DEBUG) > > LDFLAGS+= -shared -Wl,-Bsymbolic > > DPADD= ${LIBC_PIC} > > LDADD= -lc_pic -lssp_nonshared pgplkXmBVZsuh.pgp Description: PGP signature
svn commit: r216762 - head/sys/i386/xen
Author: cperciva Date: Tue Dec 28 14:36:32 2010 New Revision: 216762 URL: http://svn.freebsd.org/changeset/base/216762 Log: Remove a "not strictly correct" (and panic-inducing) workaround for a bug which doesn't seem to exist. PR: kern/141328 MFC after:3 days Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c == --- head/sys/i386/xen/pmap.cTue Dec 28 13:28:24 2010(r216761) +++ head/sys/i386/xen/pmap.cTue Dec 28 14:36:32 2010(r216762) @@ -2225,27 +2225,14 @@ pmap_remove_pte(pmap_t pmap, pt_entry_t if (oldpte & PG_G) pmap_invalidate_page(kernel_pmap, va); pmap->pm_stats.resident_count -= 1; - /* -* XXX This is not strictly correctly, but somewhere along the line -* we are losing the managed bit on some pages. It is unclear to me -* why, but I think the most likely explanation is that xen's writable -* page table implementation doesn't respect the unused bits. -*/ - if ((oldpte & PG_MANAGED) || ((oldpte & PG_V) && (va < VM_MAXUSER_ADDRESS)) - ) { + if (oldpte & PG_MANAGED) { m = PHYS_TO_VM_PAGE(xpmap_mtop(oldpte) & PG_FRAME); - - if (!(oldpte & PG_MANAGED)) - printf("va=0x%x is unmanaged :-( pte=0x%llx\n", va, oldpte); - if ((oldpte & (PG_M | PG_RW)) == (PG_M | PG_RW)) vm_page_dirty(m); if (oldpte & PG_A) vm_page_flag_set(m, PG_REFERENCED); pmap_remove_entry(pmap, m, va); - } else if ((va < VM_MAXUSER_ADDRESS) && (oldpte & PG_V)) - printf("va=0x%x is unmanaged :-( pte=0x%llx\n", va, oldpte); - + } return (pmap_unuse_pt(pmap, va, free)); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216763 - head/tools/regression/bin/sh/expansion
Author: jilles Date: Tue Dec 28 14:58:08 2010 New Revision: 216763 URL: http://svn.freebsd.org/changeset/base/216763 Log: sh: Add test for optimized command substitution. This test verifies that certain expansions without side effects do not cause the command substitution to be executed in a child process. This is not a correctness requirement, but it involves a nontrivial amount of code and it would be unfortunate if it stopped working. Added: head/tools/regression/bin/sh/expansion/cmdsubst6.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/cmdsubst6.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/cmdsubst6.0 Tue Dec 28 14:58:08 2010(r216763) @@ -0,0 +1,53 @@ +# $FreeBSD$ +# This tests if the cmdsubst optimization is still used if possible. + +failures='' +ok='' + +testcase() { + code="$1" + + unset v + eval "pid=\$(dummy=$code echo \$(\$SH -c echo\ \\\$PPID))" + + if [ "$pid" = "$$" ]; then + ok=x$ok + else + failures=x$failures + echo "Failure for $code" + fi +} + +unset v +w=1 +testcase '$w' +testcase '1${w+1}' +testcase '1${w-1}' +testcase '1${v+1}' +testcase '1${v-1}' +testcase '1${w:+1}' +testcase '1${w:-1}' +testcase '1${v:+1}' +testcase '1${v:-1}' +testcase '${w?}' +testcase '${w:?}' +testcase '${w#x}' +testcase '${w##x}' +testcase '${w%x}' +testcase '${w%%x}' + +testcase '$((w))' +testcase '$(((w+4)*2/3))' +testcase '$((w==1))' +testcase '$((w>=0 && w<=5 && w!=2))' +testcase '$((${#w}))' +testcase '$((${#IFS}))' +testcase '$((${#w}>=1))' +testcase '$(($$))' +testcase '$(($#))' +testcase '$(($?))' + +testcase '$(: $((w=4)))' +testcase '$(: ${v=2})' + +test "x$failures" = x ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r216694 - head/libexec/rtld-elf
On Tuesday, December 28, 2010 8:32:47 am Kostik Belousov wrote: > On Tue, Dec 28, 2010 at 02:29:43PM +0100, Ulrich Sp??rlein wrote: > > On Sat, 25.12.2010 at 08:42:38 +, Konstantin Belousov wrote: > > > Author: kib > > > Date: Sat Dec 25 08:42:38 2010 > > > New Revision: 216694 > > > URL: http://svn.freebsd.org/changeset/base/216694 > > > > > > Log: > > > Add a hook to pass debug flags to the build of rtld when doing make in > > > the rtld directory. > > > > > > Reviewed by:kan > > > > Please revert this, $(VAR) is against style, and passing DEBUG_FLAGS is > > the canonical way to achieve what you wanted, eg. make DEBUG_FLAGS=-g is > > working just fine for me. > DEBUG_FLAGS=-g might be fine for you, but it does not do what rtld debugging > needs. Look at the -DDEBUG. > > If you want ${} instead of $(), feel free to change. Err, why can't you use 'make DEBUG_FLAGS=-DDEBUG' or 'make DEBUG_FLAGS="-g -DDEBUG"'? If you are just doing 'make DEBUG=-DDEBUG' with this change, then I agree with Ulrich, DEBUG_FLAGS is already suitable for this purpose. -- John Baldwin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r216694 - head/libexec/rtld-elf
On Tue, Dec 28, 2010 at 10:09:40AM -0500, John Baldwin wrote: > On Tuesday, December 28, 2010 8:32:47 am Kostik Belousov wrote: > > On Tue, Dec 28, 2010 at 02:29:43PM +0100, Ulrich Sp??rlein wrote: > > > On Sat, 25.12.2010 at 08:42:38 +, Konstantin Belousov wrote: > > > > Author: kib > > > > Date: Sat Dec 25 08:42:38 2010 > > > > New Revision: 216694 > > > > URL: http://svn.freebsd.org/changeset/base/216694 > > > > > > > > Log: > > > > Add a hook to pass debug flags to the build of rtld when doing make in > > > > the rtld directory. > > > > > > > > Reviewed by: kan > > > > > > Please revert this, $(VAR) is against style, and passing DEBUG_FLAGS is > > > the canonical way to achieve what you wanted, eg. make DEBUG_FLAGS=-g is > > > working just fine for me. > > DEBUG_FLAGS=-g might be fine for you, but it does not do what rtld debugging > > needs. Look at the -DDEBUG. > > > > If you want ${} instead of $(), feel free to change. > > Err, why can't you use 'make DEBUG_FLAGS=-DDEBUG' or > 'make DEBUG_FLAGS="-g -DDEBUG"'? > > If you are just doing 'make DEBUG=-DDEBUG' with this change, then I agree > with Ulrich, DEBUG_FLAGS is already suitable for this purpose. > I previously had a version that used RTLD_DEBUG, that I set from make.conf. Now I do make DEBUG_FLAGS="-g" DEBUG="-DDEBUG". The patch allows to force the compilation of dbg() without affecting global DEBUG_FLAGS settings. All big patches to rtld have -DDEBUG addition, and I tired trying to not forget removing them before the commit. Anyway, if somebody wants to revert the whole commit, feel free, I will return to local patching. pgpHy7Zwq2Dm3.pgp Description: PGP signature
svn commit: r216764 - head/sys/dev/mpt
Author: jhb Date: Tue Dec 28 16:57:29 2010 New Revision: 216764 URL: http://svn.freebsd.org/changeset/base/216764 Log: Use bus_alloc_resource_any(). MFC after:2 weeks Modified: head/sys/dev/mpt/mpt_pci.c Modified: head/sys/dev/mpt/mpt_pci.c == --- head/sys/dev/mpt/mpt_pci.c Tue Dec 28 14:58:08 2010(r216763) +++ head/sys/dev/mpt/mpt_pci.c Tue Dec 28 16:57:29 2010(r216764) @@ -523,8 +523,8 @@ mpt_pci_attach(device_t dev) * some cards otherwise). */ mpt->pci_pio_rid = PCIR_BAR(mpt_io_bar); - mpt->pci_pio_reg = bus_alloc_resource(dev, SYS_RES_IOPORT, - &mpt->pci_pio_rid, 0, ~0, 0, RF_ACTIVE); + mpt->pci_pio_reg = bus_alloc_resource_any(dev, SYS_RES_IOPORT, + &mpt->pci_pio_rid, RF_ACTIVE); if (mpt->pci_pio_reg == NULL) { device_printf(dev, "unable to map registers in PIO mode\n"); goto bad; @@ -534,8 +534,8 @@ mpt_pci_attach(device_t dev) /* Allocate kernel virtual memory for the 9x9's Mem0 region */ mpt->pci_mem_rid = PCIR_BAR(mpt_mem_bar); - mpt->pci_reg = bus_alloc_resource(dev, SYS_RES_MEMORY, - &mpt->pci_mem_rid, 0, ~0, 0, RF_ACTIVE); + mpt->pci_reg = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &mpt->pci_mem_rid, RF_ACTIVE); if (mpt->pci_reg == NULL) { device_printf(dev, "Unable to memory map registers.\n"); if (mpt->is_sas) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216765 - head/sys/powerpc/aim
Author: nwhitehorn Date: Tue Dec 28 17:02:15 2010 New Revision: 216765 URL: http://svn.freebsd.org/changeset/base/216765 Log: Only keep track of PTE validity statistics for pages not locked in the table. The 'locked' attribute is used to circumvent the regular page table locking for some special pages, with the result that including locked pages here causes races when updating the stats. Modified: head/sys/powerpc/aim/moea64_native.c Modified: head/sys/powerpc/aim/moea64_native.c == --- head/sys/powerpc/aim/moea64_native.cTue Dec 28 16:57:29 2010 (r216764) +++ head/sys/powerpc/aim/moea64_native.cTue Dec 28 17:02:15 2010 (r216765) @@ -281,7 +281,10 @@ moea64_pte_set_native(struct lpte *pt, s EIEIO(); pt->pte_hi = pvo_pt->pte_hi; PTESYNC(); - moea64_pte_valid++; + + /* Keep statistics for unlocked pages */ + if (!(pvo_pt->pte_hi & LPTE_LOCKED)) + moea64_pte_valid++; } static void @@ -310,7 +313,10 @@ moea64_pte_unset_native(mmu_t mmu, uintp * Save the reg & chg bits. */ moea64_pte_synch_native(mmu, pt_cookie, pvo_pt); - moea64_pte_valid--; + + /* Keep statistics for unlocked pages */ + if (!(pvo_pt->pte_hi & LPTE_LOCKED)) + moea64_pte_valid--; } static void ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r216685 - head
On 12/26/2010 13:23, Bjoern A. Zeeb wrote: On Fri, 24 Dec 2010, Warner Losh wrote: Author: imp Date: Fri Dec 24 04:55:56 2010 New Revision: 216685 URL: http://svn.freebsd.org/changeset/base/216685 Log: Redirect stderr from config to /dev/null. config -m is printing lots of annoying warnings when dealing with arm. The arm config files need to be fixed, but this restricts the output to a more useful place. I'll assume these are the warning about duplicate devices and options. Would we get the same warnings again when actually running config on the kernel config files and will they then go to the logs? You'll get them again, and they will go to the appropriate _.$MACHINE.$KERNEL log file. They should be fixed, of course, but they shouldn't be in this output... Also, the warnings turned out to not be from the arm kernels at all... Warner Modified: head/Makefile Modified: head/Makefile == --- head/MakefileFri Dec 24 04:52:53 2010(r216684) +++ head/MakefileFri Dec 24 04:55:56 2010(r216685) @@ -350,8 +350,8 @@ KERNCONFS!=cd ${.CURDIR}/sys/${TARGET}/ universe_kernconfs: .for kernel in ${KERNCONFS} TARGET_ARCH_${kernel}!=cd ${.CURDIR}/sys/${TARGET}/conf && \ -config -m ${.CURDIR}/sys/${TARGET}/conf/${kernel} | \ -cut -f 2 +config -m ${.CURDIR}/sys/${TARGET}/conf/${kernel} 2> /dev/null | \ +cut -f 2 universe_kernconfs: universe_kernconf_${TARGET}_${kernel} universe_kernconf_${TARGET}_${kernel}: @(cd ${.CURDIR} && env __MAKE_CONF=/dev/null \ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r216746 - head/sys/conf
On 12/27/2010 19:02, Colin Percival wrote: On 12/27/10 17:59, Steve Kargl wrote: On Mon, Dec 27, 2010 at 11:52:40PM +, Colin Percival wrote: Make it possible to specify WITHOUT_MODULES in a kernel config file. Can you explain how this differs from makeoptions NO_MODULES which has been able to do for years? NO_MODULES means what it says: No modules. WITHOUT_MODULES="foo bar baz" means "go ahead and build modules except for foo, bar, and baz". Most of the other uses of the WITHOUT_xxx in the tree means omit feature xxx entirely... I usually hate to nit-pick names, but in this case I think "OMIT_MODULES" would be a better name and less confusing for the other uses of WITHOUT_FOO in the tree... Warner ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r216746 - head/sys/conf
On 12/27/2010 19:09, Steve Kargl wrote: On Mon, Dec 27, 2010 at 06:02:57PM -0800, Colin Percival wrote: On 12/27/10 17:59, Steve Kargl wrote: On Mon, Dec 27, 2010 at 11:52:40PM +, Colin Percival wrote: Make it possible to specify WITHOUT_MODULES in a kernel config file. Can you explain how this differs from makeoptions NO_MODULES which has been able to do for years? NO_MODULES means what it says: No modules. WITHOUT_MODULES="foo bar baz" means "go ahead and build modules except for foo, bar, and baz". Thanks. The distincion wasn't clear from the commit log. I read it as "Build a kernel WITHOUT building MODULES", which is what NO_MODULES does. which is why I'd like to have its name changed: it is confusing this way... Warner ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216766 - head/sys/dev/sound/pci/hda
Author: yongari Date: Tue Dec 28 17:45:43 2010 New Revision: 216766 URL: http://svn.freebsd.org/changeset/base/216766 Log: Add device id for RDC M3010 which is found on Vortex86 SoC. Reviewed by: mav Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c == --- head/sys/dev/sound/pci/hda/hdac.c Tue Dec 28 17:02:15 2010 (r216765) +++ head/sys/dev/sound/pci/hda/hdac.c Tue Dec 28 17:45:43 2010 (r216766) @@ -197,6 +197,10 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_ATI_RV740 HDA_MODEL_CONSTRUCT(ATI, 0xaa48) #define HDA_ATI_ALLHDA_MODEL_CONSTRUCT(ATI, 0x) +/* RDC */ +#define RDC_VENDORID 0x17f3 +#define HDA_RDC_M3010 HDA_MODEL_CONSTRUCT(RDC, 0x3010) + /* VIA */ #define VIA_VENDORID 0x1106 #define HDA_VIA_VT82XX HDA_MODEL_CONSTRUCT(VIA, 0x3288) @@ -533,6 +537,7 @@ static const struct { { HDA_ATI_RV730, "ATI RV730", 0 }, { HDA_ATI_RV740, "ATI RV740", 0 }, { HDA_ATI_RV770, "ATI RV770", 0 }, + { HDA_RDC_M3010, "RDC M3010", 0 }, { HDA_VIA_VT82XX,"VIA VT8251/8237A",0 }, { HDA_SIS_966, "SiS 966", 0 }, { HDA_ULI_M5461, "ULI M5461", 0 }, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216769 - head/usr.bin/gcore
Author: jhb Date: Tue Dec 28 18:58:15 2010 New Revision: 216769 URL: http://svn.freebsd.org/changeset/base/216769 Log: Start sentences on a new line to ease life for translators. Tweak the wording in a few places. MFC after:1 week Modified: head/usr.bin/gcore/gcore.1 Modified: head/usr.bin/gcore/gcore.1 == --- head/usr.bin/gcore/gcore.1 Tue Dec 28 18:56:55 2010(r216768) +++ head/usr.bin/gcore/gcore.1 Tue Dec 28 18:58:15 2010(r216769) @@ -59,12 +59,13 @@ The following options are available: Write the core file to the specified file instead of .Dq Pa core. . .It Fl f -Dumps all the available segments, excluding only the malformed ones and -un-dumpable ones. Unlike the default invocation, it also dumps -device- and sglist-mapped areas that may invalidate the state of -some transactions. This flag must be used very carefully, when the -behavior of the application is fully understood and the fallouts can -be easily controlled. +Dumps all available segments, excluding only malformed and undumpable segments. +Unlike the default invocation, this flag dumps mappings of devices which +may invalidate the state of device transactions or trigger other unexpected +behavior. +As a result, this flag should only be used when the behavior of the +application and any devices it has mapped is fully understood and any side +effects can be controlled or tolerated. .It Fl s Stop the process while gathering the core image, and resume it when done. @@ -90,7 +91,7 @@ Because of the .Xr ptrace 2 usage .Nm -may not work with processes which are actively investigated with +may not work with processes which are actively being investigated with .Xr truss 1 or .Xr gdb 1 . ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216772 - head/sys/vm
Author: alc Date: Tue Dec 28 20:02:30 2010 New Revision: 216772 URL: http://svn.freebsd.org/changeset/base/216772 Log: Correct a typo in vm_fault_quick_hold_pages(). Reported by: Bartosz Stec Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c == --- head/sys/vm/vm_fault.c Tue Dec 28 19:26:57 2010(r216771) +++ head/sys/vm/vm_fault.c Tue Dec 28 20:02:30 2010(r216772) @@ -1084,7 +1084,7 @@ vm_fault_quick_hold_pages(vm_map_t map, if (*mp == NULL) pmap_failed = TRUE; else if ((prot & VM_PROT_WRITE) != 0 && - (*ma)->dirty != VM_PAGE_BITS_ALL) { + (*mp)->dirty != VM_PAGE_BITS_ALL) { /* * Explicitly dirty the physical page. Otherwise, the * caller's changes may go unnoticed because they are ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216773 - head/sys/mips/cavium
Author: jmallett Date: Tue Dec 28 20:11:54 2010 New Revision: 216773 URL: http://svn.freebsd.org/changeset/base/216773 Log: When allocating memory from bootmem for the kernel to use, try to leave about 2MB of memory in the bootmem allocator for the SDK to use internally at a later point. It'd be nice if there were some functions we could call before allocating memory to let various facilities reserve some memory, but for now this seems sufficient. Previously some unfortunate systems could give up all (or at least most) of their memory to the kernel from bootmem, and then allocating command queues for packet output and the like would fail later in the boot process (which in turn would lead to crashes even later.) Reported by: kan Modified: head/sys/mips/cavium/octeon_machdep.c Modified: head/sys/mips/cavium/octeon_machdep.c == --- head/sys/mips/cavium/octeon_machdep.c Tue Dec 28 20:02:30 2010 (r216772) +++ head/sys/mips/cavium/octeon_machdep.c Tue Dec 28 20:11:54 2010 (r216773) @@ -287,6 +287,14 @@ octeon_memory_init(void) */ i = 0; while (i < PHYS_AVAIL_ENTRIES) { + /* +* If there is less than 2MB of memory available in 128-byte +* blocks, do not steal any more memory. We need to leave some +* memory for the command queues to be allocated out of. +*/ + if (cvmx_bootmem_available_mem(128) < 2 << 20) + break; + addr = cvmx_bootmem_phy_alloc(1 << 20, phys_end, ~(vm_paddr_t)0, PAGE_SIZE, 0); if (addr == -1) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216774 - head/sys/nfsserver
Author: pjd Date: Tue Dec 28 21:12:15 2010 New Revision: 216774 URL: http://svn.freebsd.org/changeset/base/216774 Log: ZFS might not return monotonically increasing directory offset cookies, so turn off UFS-specific hack that assumes so in ZFS case. Before the change we can miss returning some directory entries to a NFS client. I believe that the hack should be moved to ufs_readdir(), but until we find somebody who will do it, turn it off for ZFS in NFS server code. Submitted by: rmacklem Discussed with: rmacklem, mckusick MFC after:3 days Modified: head/sys/nfsserver/nfs_serv.c Modified: head/sys/nfsserver/nfs_serv.c == --- head/sys/nfsserver/nfs_serv.c Tue Dec 28 20:11:54 2010 (r216773) +++ head/sys/nfsserver/nfs_serv.c Tue Dec 28 21:12:15 2010 (r216774) @@ -2737,7 +2737,7 @@ nfsrv_readdir(struct nfsrv_descript *nfs int v3 = (nfsd->nd_flag & ND_NFSV3); u_quad_t off, toff, verf; u_long *cookies = NULL, *cookiep; /* needs to be int64_t or off_t */ - int vfslocked; + int vfslocked, not_zfs; nfsdbprintf(("%s %d\n", __FILE__, __LINE__)); vfslocked = 0; @@ -2801,6 +2801,7 @@ nfsrv_readdir(struct nfsrv_descript *nfs error = 0; goto nfsmout; } + not_zfs = strcmp(vp->v_mount->mnt_vfc->vfc_name, "zfs") != 0; VOP_UNLOCK(vp, 0); /* @@ -2887,10 +2888,12 @@ again: * skip over the records that precede the requested offset. This * requires the assumption that file offset cookies monotonically * increase. +* Since the offset cookies don't monotonically increase for ZFS, +* this is not done when ZFS is the file system. */ while (cpos < cend && ncookies > 0 && (dp->d_fileno == 0 || dp->d_type == DT_WHT || -((u_quad_t)(*cookiep)) <= toff)) { +(not_zfs != 0 && ((u_quad_t)(*cookiep)) <= toff))) { cpos += dp->d_reclen; dp = (struct dirent *)cpos; cookiep++; @@ -3037,6 +3040,7 @@ nfsrv_readdirplus(struct nfsrv_descript int usevget = 1, vfslocked; struct componentname cn; struct mount *mntp = NULL; + int not_zfs; nfsdbprintf(("%s %d\n", __FILE__, __LINE__)); vfslocked = 0; @@ -3097,6 +3101,7 @@ nfsrv_readdirplus(struct nfsrv_descript error = 0; goto nfsmout; } + not_zfs = strcmp(vp->v_mount->mnt_vfc->vfc_name, "zfs") != 0; VOP_UNLOCK(vp, 0); vp_locked = 0; rbuf = malloc(siz, M_TEMP, M_WAITOK); @@ -3176,10 +3181,12 @@ again: * skip over the records that precede the requested offset. This * requires the assumption that file offset cookies monotonically * increase. +* Since the offset cookies don't monotonically increase for ZFS, +* this is not done when ZFS is the file system. */ while (cpos < cend && ncookies > 0 && (dp->d_fileno == 0 || dp->d_type == DT_WHT || -((u_quad_t)(*cookiep)) <= toff)) { +(not_zfs != 0 && ((u_quad_t)(*cookiep)) <= toff))) { cpos += dp->d_reclen; dp = (struct dirent *)cpos; cookiep++; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216775 - head/sys/conf
Author: imp Date: Tue Dec 28 21:18:58 2010 New Revision: 216775 URL: http://svn.freebsd.org/changeset/base/216775 Log: Due to the automatic inclusion of DEFAULTS everywhere, and since it has device mem in it almost everywhere, we get warnings about duplicated device almost everywhere. Comment it out, with a note about why, so that we don't get those warnings. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Tue Dec 28 21:12:15 2010(r216774) +++ head/sys/conf/NOTES Tue Dec 28 21:18:58 2010(r216775) @@ -1110,7 +1110,8 @@ options VFS_AIO device random # The system memory devices; /dev/mem, /dev/kmem -device mem +# In various system's DEFAULTS file, so we don't need it here. +#devicemem # The kernel symbol table device; /dev/ksyms device ksyms ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216776 - head/sys/i386/conf
Author: imp Date: Tue Dec 28 21:20:58 2010 New Revision: 216776 URL: http://svn.freebsd.org/changeset/base/216776 Log: Remove mem, io, isa and npx since they are duplicative of the entries in DEFAULTS. Saves 8 lines of warnings when we build XBOX. Modified: head/sys/i386/conf/XBOX Modified: head/sys/i386/conf/XBOX == --- head/sys/i386/conf/XBOX Tue Dec 28 21:18:58 2010(r216775) +++ head/sys/i386/conf/XBOX Tue Dec 28 21:20:58 2010(r216776) @@ -47,8 +47,6 @@ options TIMER_FREQ=1125000 # Gives ~733 #deviceapic# I/O APIC -# Bus support. Do not remove isa, even if you have no isa slots -device isa device pci # ATA and ATAPI devices @@ -61,13 +59,8 @@ options ATA_STATIC_ID # Static device n device scbus # SCSI bus (required for SCSI) device da # Direct Access (disks) -# Floating point support - do not disable. -device npx - # Pseudo devices. device loop# Network loopback -device mem # Memory and kernel memory devices -device io # I/O device device random # Entropy device device ether # Ethernet support #devicetun # Packet tunnel. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216777 - head/sys/i386/conf
Author: imp Date: Tue Dec 28 21:22:08 2010 New Revision: 216777 URL: http://svn.freebsd.org/changeset/base/216777 Log: Comment out npx and isa from NOTES file. We don't need them here since DEFAULTS already pulls them in. Modified: head/sys/i386/conf/NOTES Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESTue Dec 28 21:20:58 2010(r216776) +++ head/sys/i386/conf/NOTESTue Dec 28 21:22:08 2010(r216777) @@ -284,7 +284,8 @@ device apm_saver # Requires APM # # ISA bus # -device isa # Required by npx(4) +# Already in DEFAULTS, which means we don't need it here. +#deviceisa # Required by npx(4) # # Options for `isa': @@ -372,7 +373,8 @@ options X86BIOS # # The Numeric Processing eXtension driver. This is non-optional. -device npx +# Already in DEFAULTS, which means we don't need it here. +#devicenpx hint.npx.0.flags="0x0" hint.npx.0.irq="13" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216778 - in head: bin/sh tools/regression/bin/sh/expansion
Author: jilles Date: Tue Dec 28 21:27:08 2010 New Revision: 216778 URL: http://svn.freebsd.org/changeset/base/216778 Log: sh: Don't do optimized command substitution if expansions have side effects. Before considering to execute a command substitution in the same process, check if any of the expansions may have a side effect; if so, execute it in a new process just like happens if it is not a single simple command. Although the check happens at run time, it is a static check that does not depend on current state. It is triggered by: - expanding $! (which may cause the job to be remembered) - ${var=value} default value assignment - assignment operators in arithmetic - parameter substitutions in arithmetic except ${#param}, $$, $# and $? - command substitutions in arithmetic This means that $((v+1)) does not prevent optimized command substitution, whereas $(($v+1)) does, because $v might expand to something containing assignment operators. Scripts should not depend on these exact details for correctness. It is also imaginable to have the shell fork if and when a side effect is encountered or to create a new temporary namespace for variables. Due to the $! change, the construct $(jobs $!) no longer works. The value of $! should be stored in a variable outside command substitution first. Added: head/tools/regression/bin/sh/expansion/cmdsubst7.0 (contents, props changed) Modified: head/bin/sh/eval.c head/bin/sh/expand.c head/bin/sh/expand.h Modified: head/bin/sh/eval.c == --- head/bin/sh/eval.c Tue Dec 28 21:22:08 2010(r216777) +++ head/bin/sh/eval.c Tue Dec 28 21:27:08 2010(r216778) @@ -94,6 +94,7 @@ static void evalsubshell(union node *, i static void evalredir(union node *, int); static void expredir(union node *); static void evalpipe(union node *); +static int is_valid_fast_cmdsubst(union node *n); static void evalcommand(union node *, int, struct backcmd *); static void prehash(union node *); @@ -565,6 +566,19 @@ evalpipe(union node *n) +static int +is_valid_fast_cmdsubst(union node *n) +{ + union node *argp; + + if (n->type != NCMD) + return 0; + for (argp = n->ncmd.args ; argp ; argp = argp->narg.next) + if (expandhassideeffects(argp->narg.text)) + return 0; + return 1; +} + /* * Execute a command inside back quotes. If it's a builtin command, we * want to save its output in a block obtained from malloc. Otherwise @@ -590,7 +604,7 @@ evalbackcmd(union node *n, struct backcm exitstatus = 0; goto out; } - if (n->type == NCMD) { + if (is_valid_fast_cmdsubst(n)) { exitstatus = oexitstatus; savehandler = handler; if (setjmp(jmploc.loc)) { Modified: head/bin/sh/expand.c == --- head/bin/sh/expand.cTue Dec 28 21:22:08 2010(r216777) +++ head/bin/sh/expand.cTue Dec 28 21:27:08 2010(r216778) @@ -1570,6 +1570,78 @@ cvtnum(int num, char *buf) } /* + * Check statically if expanding a string may have side effects. + */ +int +expandhassideeffects(const char *p) +{ + int c; + int arinest; + + arinest = 0; + while ((c = *p++) != '\0') { + switch (c) { + case CTLESC: + p++; + break; + case CTLVAR: + c = *p++; + /* Expanding $! sets the job to remembered. */ + if (*p == '!') + return 1; + if ((c & VSTYPE) == VSASSIGN) + return 1; + /* +* If we are in arithmetic, the parameter may contain +* '=' which may cause side effects. Exceptions are +* the length of a parameter and $$, $# and $? which +* are always numeric. +*/ + if ((c & VSTYPE) == VSLENGTH) { + while (*p != '=') + p++; + p++; + break; + } + if ((*p == '$' || *p == '#' || *p == '?') && + p[1] == '=') { + p += 2; + break; + } + if (arinest > 0) + return 1; + break; + case CTLBACKQ: + case CTLBACKQ | CTLQUOTE: + if (arinest > 0) + return 1; + break;
svn commit: r216780 - head/libexec/rtld-elf/powerpc64
Author: nwhitehorn Date: Tue Dec 28 22:31:59 2010 New Revision: 216780 URL: http://svn.freebsd.org/changeset/base/216780 Log: Fix an error in the ABI in rtld_bind_start(). When passing arguments to a C function, the caller's stack frame must have room to store all of the arguments to that function. While here, fix stack frame alignment issues. Without this change, the compiler will save r3 and r4 into the caller's stack frame before calling setjmp() in _rtld_bind(). These would then overwrite arguments to the newly-bound function, causing eventual failures. Modified: head/libexec/rtld-elf/powerpc64/rtld_start.S Modified: head/libexec/rtld-elf/powerpc64/rtld_start.S == --- head/libexec/rtld-elf/powerpc64/rtld_start.STue Dec 28 21:40:19 2010(r216779) +++ head/libexec/rtld-elf/powerpc64/rtld_start.STue Dec 28 22:31:59 2010(r216780) @@ -35,15 +35,15 @@ .extern _DYNAMIC _ENTRY(_rtld_start) - stdu%r1,-96(%r1)/* 16-byte aligned stack for reg saves + + stdu%r1,-144(%r1) /* 16-byte aligned stack for reg saves + exit_proc & obj _rtld args + backchain & lrsave stack frame */ - std %r3,48(%r1) /* argc */ - std %r4,56(%r1) /* argv */ - std %r5,64(%r1) /* envp */ -/* std %r6,72(%r1) *//* obj (always 0) */ -/* std %r7,80(%r1) *//* cleanup (always 0) */ - std %r8,88(%r1) /* ps_strings */ + std %r3,96(%r1) /* argc */ + std %r4,104(%r1)/* argv */ + std %r5,112(%r1)/* envp */ +/* std %r6,120(%r1) *//* obj (always 0) */ +/* std %r7,128(%r1) *//* cleanup (always 0) */ + std %r8,136(%r1)/* ps_strings */ /* * Perform initial relocation of ld-elf.so. Not as easy as it @@ -75,10 +75,10 @@ _ENTRY(_rtld_start) * original stack layout has to be found by moving back a word * from the argv pointer. */ - ld %r4,56(%r1) + ld %r4,104(%r1) addi%r3,%r4,-8 /* locate argc ptr, &argv[-1] */ - addi%r4,%r1,80 /* &exit_proc on stack */ - addi%r5,%r1,72 /* &obj_main on stack */ + addi%r4,%r1,128 /* &exit_proc on stack */ + addi%r5,%r1,120 /* &obj_main on stack */ bl ._rtld /* &_start = _rtld(sp, &exit_proc, &obj_main)*/ nop @@ -90,12 +90,12 @@ _ENTRY(_rtld_start) /* * Restore args, with new obj/exit proc */ - ld %r3,48(%r1) /* argc */ - ld %r4,56(%r1) /* argv */ - ld %r5,64(%r1) /* envp */ - ld %r6,72(%r1) /* obj */ - ld %r7,80(%r1) /* exit proc */ - ld %r8,88(%r1) /* ps_strings */ + ld %r3,96(%r1) /* argc */ + ld %r4,104(%r1)/* argv */ + ld %r5,112(%r1)/* envp */ + ld %r6,120(%r1)/* obj */ + ld %r7,128(%r1)/* exit proc */ + ld %r8,136(%r1)/* ps_strings */ blrl/* _start(argc, argv, envp, obj, cleanup, ps_strings) */ @@ -119,16 +119,17 @@ _ENTRY(_rtld_bind_start) mfcr%r0 std %r0,8(%r1) # save cr - stdu%r1,-48-9*8(%r1)# stack space for 8 regs + header - std %r3,48+0*8(%r1) # save r3-r31 - std %r4,48+1*8(%r1) - std %r5,48+2*8(%r1) - std %r6,48+3*8(%r1) - std %r7,48+4*8(%r1) - std %r8,48+5*8(%r1) - std %r9,48+6*8(%r1) - std %r10,48+7*8(%r1) - std %r12,48+8*8(%r1) + stdu%r1,-48-12*8(%r1) # stack space for 8 regs + header + # + 2 save regs + std %r3,64+0*8(%r1) # save r3-r31 + std %r4,64+1*8(%r1) + std %r5,64+2*8(%r1) + std %r6,64+3*8(%r1) + std %r7,64+4*8(%r1) + std %r8,64+5*8(%r1) + std %r9,64+6*8(%r1) + std %r10,64+7*8(%r1) + std %r12,64+8*8(%r1) ld %r3,0(%r11) ld %r4,8(%r11) @@ -140,22 +141,21 @@ _ENTRY(_rtld_bind_start) ld %r3,0(%r3) mtctr %r3 # move absolute target addr into ctr -ld %r3,48+0*8(%r1) # restore r3-r31 -ld %r4,48+1*8(%r1) -ld %r5,48+2*8(%r1) -ld %r6,48+3*8(%r1) - ld %r7,48+4*8(%r1) - ld %r8,48+5*8(%r1) - ld %r9,48+6*8(%r1) - ld %r10,48+7*8(%r1) - ld %r12,48+8*8(%r1) - -addi%r1,%r1,48+9*8 # restore stack - -ld %r0,8(%r1) # restore cr -mtcr%r0 -ld %r0,16(%r1) # restore lr -mtlr%r0 + ld
svn commit: r216781 - head/sys/conf
Author: imp Date: Tue Dec 28 22:44:32 2010 New Revision: 216781 URL: http://svn.freebsd.org/changeset/base/216781 Log: Revert r216775, per jhb@ Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES == --- head/sys/conf/NOTES Tue Dec 28 22:31:59 2010(r216780) +++ head/sys/conf/NOTES Tue Dec 28 22:44:32 2010(r216781) @@ -1110,8 +1110,7 @@ options VFS_AIO device random # The system memory devices; /dev/mem, /dev/kmem -# In various system's DEFAULTS file, so we don't need it here. -#devicemem +device mem # The kernel symbol table device; /dev/ksyms device ksyms ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216782 - head/sys/i386/conf
Author: imp Date: Tue Dec 28 22:45:29 2010 New Revision: 216782 URL: http://svn.freebsd.org/changeset/base/216782 Log: Revert r216777, per jhb@ Modified: head/sys/i386/conf/NOTES Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESTue Dec 28 22:44:32 2010(r216781) +++ head/sys/i386/conf/NOTESTue Dec 28 22:45:29 2010(r216782) @@ -284,8 +284,7 @@ device apm_saver # Requires APM # # ISA bus # -# Already in DEFAULTS, which means we don't need it here. -#deviceisa # Required by npx(4) +device isa # Required by npx(4) # # Options for `isa': @@ -373,8 +372,7 @@ options X86BIOS # # The Numeric Processing eXtension driver. This is non-optional. -# Already in DEFAULTS, which means we don't need it here. -#devicenpx +device npx hint.npx.0.flags="0x0" hint.npx.0.irq="13" ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216783 - head/sys/conf
Author: imp Date: Tue Dec 28 22:49:28 2010 New Revision: 216783 URL: http://svn.freebsd.org/changeset/base/216783 Log: MIPS has lots of flavors as well Modified: head/sys/conf/makeLINT.mk Modified: head/sys/conf/makeLINT.mk == --- head/sys/conf/makeLINT.mk Tue Dec 28 22:45:29 2010(r216782) +++ head/sys/conf/makeLINT.mk Tue Dec 28 22:49:28 2010(r216783) @@ -17,6 +17,6 @@ LINT: ${NOTES} ../../conf/makeLINT.sed echo "ident ${.TARGET}-VIMAGE" >> ${.TARGET}-VIMAGE echo "options VIMAGE" >> ${.TARGET}-VIMAGE .endif -.if ${TARGET} == "powerpc" +.if ${TARGET} == "powerpc" || ${TARGET} == "mips" echo "machine ${TARGET} ${TARGET_ARCH}" >> ${.TARGET} .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216784 - in head/sys/fs: nfs nfsserver
Author: rmacklem Date: Tue Dec 28 23:50:13 2010 New Revision: 216784 URL: http://svn.freebsd.org/changeset/base/216784 Log: Delete the nfsvno_localconflict() function in the experimental NFS server since it is no longer used and is broken. MFC after:2 weeks Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsserver/nfs_nfsdport.c Modified: head/sys/fs/nfs/nfs_var.h == --- head/sys/fs/nfs/nfs_var.h Tue Dec 28 22:49:28 2010(r216783) +++ head/sys/fs/nfs/nfs_var.h Tue Dec 28 23:50:13 2010(r216784) @@ -569,8 +569,6 @@ int nfsvno_fhtovp(mount_t, fhandle_t *, int nfsvno_pathconf(vnode_t, int, register_t *, struct ucred *, NFSPROC_T *); vnode_t nfsvno_getvp(fhandle_t *); -int nfsvno_localconflict(vnode_t, int, u_int64_t, u_int64_t, -struct nfslockconflict *, NFSPROC_T *); int nfsvno_advlock(vnode_t, int, u_int64_t, u_int64_t, NFSPROC_T *); void nfsvno_unlockvfs(mount_t); int nfsvno_lockvfs(mount_t); Modified: head/sys/fs/nfsserver/nfs_nfsdport.c == --- head/sys/fs/nfsserver/nfs_nfsdport.cTue Dec 28 22:49:28 2010 (r216783) +++ head/sys/fs/nfsserver/nfs_nfsdport.cTue Dec 28 23:50:13 2010 (r216784) @@ -2781,66 +2781,6 @@ nfsvno_getvp(fhandle_t *fhp) } /* - * Check to see it a byte range lock held by a process running - * locally on the server conflicts with the new lock. - */ -int -nfsvno_localconflict(struct vnode *vp, int ftype, u_int64_t first, -u_int64_t end, struct nfslockconflict *cfp, struct thread *td) -{ - int error; - struct flock fl; - - if (!nfsrv_dolocallocks) - return (0); - fl.l_whence = SEEK_SET; - fl.l_type = ftype; - fl.l_start = (off_t)first; - if (end == NFS64BITSSET) - fl.l_len = 0; - else - fl.l_len = (off_t)(end - first); - /* -* For FreeBSD8, the l_pid and l_sysid must be set to the same -* values for all calls, so that all locks will be held by the -* nfsd server. (The nfsd server handles conflicts between the -* various clients.) -* Since an NFSv4 lockowner is a ClientID plus an array of up to 1024 -* bytes, so it can't be put in l_sysid. -*/ - if (nfsv4_sysid == 0) - nfsv4_sysid = nlm_acquire_next_sysid(); - fl.l_pid = (pid_t)0; - fl.l_sysid = (int)nfsv4_sysid; - - NFSVOPUNLOCK(vp, 0, td); - error = VOP_ADVLOCK(vp, (caddr_t)td->td_proc, F_GETLK, &fl, - (F_POSIX | F_REMOTE)); - NFSVOPLOCK(vp, LK_EXCLUSIVE | LK_RETRY, td); - if (error) - return (error); - if (fl.l_type == F_UNLCK) - return (0); - if (cfp != NULL) { - cfp->cl_clientid.lval[0] = cfp->cl_clientid.lval[1] = 0; - cfp->cl_first = (u_int64_t)fl.l_start; - if (fl.l_len == 0) - cfp->cl_end = NFS64BITSSET; - else - cfp->cl_end = (u_int64_t) - (fl.l_start + fl.l_len); - if (fl.l_type == F_WRLCK) - cfp->cl_flags = NFSLCK_WRITE; - else - cfp->cl_flags = NFSLCK_READ; - sprintf(cfp->cl_owner, "LOCALID%d", fl.l_pid); - cfp->cl_ownerlen = strlen(cfp->cl_owner); - return (NFSERR_DENIED); - } - return (NFSERR_INVAL); -} - -/* * Do a local VOP_ADVLOCK(). */ int ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r216769 - head/usr.bin/gcore
On Tue, 28 Dec 2010, John Baldwin wrote: Log: Start sentences on a new line to ease life for translators. Tweak the wording in a few places. Simplifying life for translators is only a side effect. Modified: head/usr.bin/gcore/gcore.1 == --- head/usr.bin/gcore/gcore.1 Tue Dec 28 18:56:55 2010(r216768) +++ head/usr.bin/gcore/gcore.1 Tue Dec 28 18:58:15 2010(r216769) @@ -59,12 +59,13 @@ The following options are available: Write the core file to the specified file instead of .Dq Pa core. . .It Fl f -Dumps all the available segments, excluding only the malformed ones and -un-dumpable ones. Unlike the default invocation, it also dumps -device- and sglist-mapped areas that may invalidate the state of -some transactions. This flag must be used very carefully, when the -behavior of the application is fully understood and the fallouts can -be easily controlled. Hard coded sentence breaks gave formatting that might be, and in fact was wrong for at least -Tascii format, since 1 space was hard coded but the default is the normal 2 spaces. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r216782 - head/sys/i386/conf
On Tue, 28 Dec 2010, Warner Losh wrote: Log: Revert r216777, per jhb@ I didn't see "per jhb@". I think the bug DEFAULTS being included unconditionally (and maybe the name of DEFAULTS -- defaults hould be optional). Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESTue Dec 28 22:44:32 2010(r216781) +++ head/sys/i386/conf/NOTESTue Dec 28 22:45:29 2010(r216782) @@ -284,8 +284,7 @@ device apm_saver # Requires APM # # ISA bus # -# Already in DEFAULTS, which means we don't need it here. -#deviceisa # Required by npx(4) +device isa # Required by npx(4) This comment seems wrong. isa used to be required for the isa resources related to irq13, but npx no longer supports irq13. It now seems to use isa only for PNPBIOS, but that is ifdefed so it doesn't require isa (except for test coverage). # # Options for `isa': @@ -373,8 +372,7 @@ options X86BIOS # # The Numeric Processing eXtension driver. This is non-optional. -# Already in DEFAULTS, which means we don't need it here. -#devicenpx +device npx hint.npx.0.flags="0x0" hint.npx.0.irq="13" These hints are more clearly garbage: - the flags hint hasn't worked since FreeBSD-4 or earlier, where it controlled use of npx for bcopy and bzero (but this use stopped being useful with Pentium 1's many years before FreeBSD-4 was released). The flags hint remained referenced until rev.1.182 (2010/06/23), but only in ifdefed-out code. Then the dead code was removed too. - the support for irq13 was removed in rev.1.183 (also on 2010/06/23). npx.c still has some references to removed code in comments (several IRQ13's and one "BUSY# latch". The BUSY# latch was only ISA address used IIRC. npx used to use nexus for configuring the flags and irq at least. I think it no longer does, but nexus.c still gives npx as an example of special handling in a comment. npx.4 still has hints for the unused(?) nexus, the unused port for the BUSY# latch, the unused flags for bcopying (including a very detailed description of when these flags are applied, which rotted started with ifdefing out the code that applied them), and the unused irq. After removing these anachronisms including the BUGS section (which is entirely FUD about the unused irq13), npx.4 has about 5 useful lines. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r216782 - head/sys/i386/conf
On 12/28/2010 20:34, Bruce Evans wrote: On Tue, 28 Dec 2010, Warner Losh wrote: Log: Revert r216777, per jhb@ I didn't see "per jhb@". I think the bug DEFAULTS being included unconditionally (and maybe the name of DEFAULTS -- defaults hould be optional). I'm working up a patch to address these concerns. I'll include you on the reviewer list. Modified: head/sys/i386/conf/NOTES == --- head/sys/i386/conf/NOTESTue Dec 28 22:44:32 2010(r216781) +++ head/sys/i386/conf/NOTESTue Dec 28 22:45:29 2010(r216782) @@ -284,8 +284,7 @@ deviceapm_saver# Requires APM # # ISA bus # -# Already in DEFAULTS, which means we don't need it here. -#deviceisa# Required by npx(4) +deviceisa# Required by npx(4) This comment seems wrong. isa used to be required for the isa resources related to irq13, but npx no longer supports irq13. It now seems to use isa only for PNPBIOS, but that is ifdefed so it doesn't require isa (except for test coverage). I think you may be right. ISA is still required, but not for the reason listed here. # # Options for `isa': @@ -373,8 +372,7 @@ optionsX86BIOS # # The Numeric Processing eXtension driver. This is non-optional. -# Already in DEFAULTS, which means we don't need it here. -#devicenpx +devicenpx hint.npx.0.flags="0x0" hint.npx.0.irq="13" These hints are more clearly garbage: - the flags hint hasn't worked since FreeBSD-4 or earlier, where it controlled use of npx for bcopy and bzero (but this use stopped being useful with Pentium 1's many years before FreeBSD-4 was released). The flags hint remained referenced until rev.1.182 (2010/06/23), but only in ifdefed-out code. Then the dead code was removed too. - the support for irq13 was removed in rev.1.183 (also on 2010/06/23). npx.c still has some references to removed code in comments (several IRQ13's and one "BUSY# latch". The BUSY# latch was only ISA address used IIRC. npx used to use nexus for configuring the flags and irq at least. I think it no longer does, but nexus.c still gives npx as an example of special handling in a comment. npx.4 still has hints for the unused(?) nexus, the unused port for the BUSY# latch, the unused flags for bcopying (including a very detailed description of when these flags are applied, which rotted started with ifdefing out the code that applied them), and the unused irq. After removing these anachronisms including the BUGS section (which is entirely FUD about the unused irq13), npx.4 has about 5 useful lines. I'm sure that nobody would object in the slightest if you did a pass over the code and manual page and fixed it up. I doubt anybody else could double the useful line count, let alone make it correct :) Warner ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r216790 - head/sys/dev/xen/console
Author: cperciva Date: Wed Dec 29 05:13:21 2010 New Revision: 216790 URL: http://svn.freebsd.org/changeset/base/216790 Log: A lack of console input is not the same thing as a byte of \0 input. Correctly return -1 from cngetc when no input is available to be read. This fixes the '(CTRL-C to abort)' spam while dumping. MFC after:3 days Modified: head/sys/dev/xen/console/console.c Modified: head/sys/dev/xen/console/console.c == --- head/sys/dev/xen/console/console.c Wed Dec 29 04:17:50 2010 (r216789) +++ head/sys/dev/xen/console/console.c Wed Dec 29 05:13:21 2010 (r216790) @@ -125,17 +125,18 @@ xc_cnterm(struct consdev *cp) static int xc_cngetc(struct consdev *dev) { - int ret = (xc_mute ? 0 : -1); + int ret; if (xencons_has_input()) xencons_handle_input(NULL); CN_LOCK(cn_mtx); - if ((rp - rc)) { + if ((rp - rc) && !xc_mute) { /* we need to return only one char */ ret = (int)rbuf[RBUF_MASK(rc)]; rc++; - } + } else + ret = -1; CN_UNLOCK(cn_mtx); return(ret); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"