svn commit: r291576 - head/sys/vm
Author: kib Date: Tue Dec 1 09:06:09 2015 New Revision: 291576 URL: https://svnweb.freebsd.org/changeset/base/291576 Log: r221714 fixed the situation when the collapse scan improperly handled invalid (busy) page supposedly inserted by the vm_fault(), in the OBSC_COLLAPSE_NOWAIT case. As a continuation to r221714, fix a case when invalid page is found by the object scan in OBSC_COLLAPSE_WAIT case as well. But, since this is waitable scan, we should wait for the termination of the busy state and restart from the beginning of the backing object' page queue. [*] Do not free the shadow page swap space when the parent page is invalid, otherwise this action potentially corrupts user data. Combine all instances of the collapse scan sleep code fragments into the new helper vm_object_backing_scan_wait(). Improve style compliance and comments. Change the return type of vm_object_backing_scan() to bool. Initial submission by:cem, https://reviews.freebsd.org/D4103 [*] Reviewed by: alc, cem Tested by:cem Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revision:https://reviews.freebsd.org/D4146 Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c == --- head/sys/vm/vm_object.c Tue Dec 1 07:52:41 2015(r291575) +++ head/sys/vm/vm_object.c Tue Dec 1 09:06:09 2015(r291576) @@ -1423,13 +1423,40 @@ retry: #defineOBSC_COLLAPSE_NOWAIT0x0002 #defineOBSC_COLLAPSE_WAIT 0x0004 -static int +static vm_page_t +vm_object_backing_scan_wait(vm_object_t object, vm_page_t p, vm_page_t next, +int op) +{ + vm_object_t backing_object; + + VM_OBJECT_ASSERT_WLOCKED(object); + backing_object = object->backing_object; + VM_OBJECT_ASSERT_WLOCKED(backing_object); + + KASSERT(p == NULL || vm_page_busied(p), ("unbusy page %p", p)); + KASSERT(p == NULL || p->object == object || p->object == backing_object, + ("invalid ownership %p %p %p", p, object, backing_object)); + if ((op & OBSC_COLLAPSE_NOWAIT) != 0) + return (next); + if (p != NULL) + vm_page_lock(p); + VM_OBJECT_WUNLOCK(object); + VM_OBJECT_WUNLOCK(backing_object); + if (p == NULL) + VM_WAIT; + else + vm_page_busy_sleep(p, "vmocol"); + VM_OBJECT_WLOCK(object); + VM_OBJECT_WLOCK(backing_object); + return (TAILQ_FIRST(&backing_object->memq)); +} + +static bool vm_object_backing_scan(vm_object_t object, int op) { - int r = 1; - vm_page_t p; vm_object_t backing_object; - vm_pindex_t backing_offset_index; + vm_page_t next, p, pp; + vm_pindex_t backing_offset_index, new_pindex; VM_OBJECT_ASSERT_WLOCKED(object); VM_OBJECT_ASSERT_WLOCKED(object->backing_object); @@ -1451,7 +1478,7 @@ vm_object_backing_scan(vm_object_t objec * shadow test may succeed! XXX */ if (backing_object->type != OBJT_DEFAULT) { - return (0); + return (false); } } if (op & OBSC_COLLAPSE_WAIT) { @@ -1463,24 +1490,19 @@ vm_object_backing_scan(vm_object_t objec */ p = TAILQ_FIRST(&backing_object->memq); while (p) { - vm_page_t next = TAILQ_NEXT(p, listq); - vm_pindex_t new_pindex = p->pindex - backing_offset_index; - + next = TAILQ_NEXT(p, listq); + new_pindex = p->pindex - backing_offset_index; if (op & OBSC_TEST_ALL_SHADOWED) { - vm_page_t pp; - /* * Ignore pages outside the parent object's range * and outside the parent object's mapping of the * backing object. * -* note that we do not busy the backing object's +* Note that we do not busy the backing object's * page. */ - if ( - p->pindex < backing_offset_index || - new_pindex >= object->size - ) { + if (p->pindex < backing_offset_index || + new_pindex >= object->size) { p = next; continue; } @@ -1496,55 +1518,26 @@ vm_object_backing_scan(vm_object_t objec */ pp = vm_page_lookup(object, new_pindex); - if ( - (pp == NULL || pp->valid == 0) && - !vm_pager_has_page(object, new_pindex, NULL, NULL) -
svn commit: r291577 - head/sys/arm64/arm64
Author: andrew Date: Tue Dec 1 09:52:41 2015 New Revision: 291577 URL: https://svnweb.freebsd.org/changeset/base/291577 Log: Print useful information when we hit a data abort we can't handle. This prints the trap frame, along with the exception syndrome and fault address registers. Even though esr is 64-bits here it is only 32-bits in hardware so only print the valid 32-bits. While here also print esr and far when appropriate after printing the trap frame. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/trap.c Modified: head/sys/arm64/arm64/trap.c == --- head/sys/arm64/arm64/trap.c Tue Dec 1 09:06:09 2015(r291576) +++ head/sys/arm64/arm64/trap.c Tue Dec 1 09:52:41 2015(r291577) @@ -186,6 +186,8 @@ data_abort(struct trapframe *frame, uint if (td->td_critnest != 0 || WITNESS_CHECK(WARN_SLEEPOK | WARN_GIANTOK, NULL, "Kernel page fault") != 0) { print_registers(frame); + printf(" far: %16lx\n", far); + printf(" esr: %.8lx\n", esr); panic("data abort in critical section or under mutex"); } @@ -220,6 +222,12 @@ data_abort(struct trapframe *frame, uint frame->tf_elr = pcb->pcb_onfault; return; } + + printf("Fatal data abort:\n"); + print_registers(frame); + printf(" far: %16lx\n", far); + printf(" esr: %.8lx\n", esr); + #ifdef KDB if (debugger_on_panic || kdb_active) if (kdb_trap(ESR_ELx_EXCEPTION(esr), 0, frame)) @@ -271,6 +279,7 @@ do_el1h_sync(struct trapframe *frame) case EXCP_FP_SIMD: case EXCP_TRAP_FP: print_registers(frame); + printf(" esr: %.8lx\n", esr); panic("VFP exception in the kernel"); case EXCP_DATA_ABORT: far = READ_SPECIALREG(far_el1); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r291566 - in head: . lib/libelf
On Tue, 1 Dec 2015 06:09:22 + (UTC) Garrett Cooper wrote: > Author: ngie > Date: Tue Dec 1 06:09:22 2015 > New Revision: 291566 > URL: https://svnweb.freebsd.org/changeset/base/291566 > > Log: > Move libelf.so.2 from /usr/lib to /lib to unbreak libkvm use after > r291406 > Tested with the following commands as root: > - yes | make delete-old > - service ldconfig restart > - netstat -nr > > X-MFC with: r291406 > Reviewed by: jhb, kib > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/ObsoleteFiles.inc > head/lib/libelf/Makefile > > Modified: head/ObsoleteFiles.inc > == > --- head/ObsoleteFiles.incTue Dec 1 05:59:53 2015 > (r291565) +++ head/ObsoleteFiles.inc Tue Dec 1 06:09:22 > 2015 (r291566) @@ -38,6 +38,8 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in > r291406) +OLD_FILES+=usr/lib/libelf.so.2 > # 20151115: Fox bad upgrade scheme > OLD_FILES+=usr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030 > OLD_FILES+=usr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312 > > Modified: head/lib/libelf/Makefile > == > --- head/lib/libelf/Makefile Tue Dec 1 05:59:53 2015 > (r291565) +++ head/lib/libelf/MakefileTue Dec 1 06:09:22 > 2015 (r291566) @@ -7,6 +7,7 @@ SRCDIR= ${TOP}/libelf > .PATH: ${SRCDIR} > > LIB= elf > +SHLIBDIR?= /lib Hello. Maybe SHLIBDIR= /lib ? Thanks. > > SRCS= > elf.c \ > elf_begin.c \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291578 - head/sys/netinet6
Author: ae Date: Tue Dec 1 11:17:41 2015 New Revision: 291578 URL: https://svnweb.freebsd.org/changeset/base/291578 Log: mld_v2_dispatch_general_query() is used by mld_fasttimo_vnet() to send a reply to the MLDv2 General Query. In case when router has a lot of multicast groups, the reply can take several packets due to MTU limitation. Also we have a limit MLD_MAX_RESPONSE_BURST == 4, that limits the number of packets we send in one shot. Then we recalculate the timer value and schedule the remaining packets for sending. The problem is that when we call mld_v2_dispatch_general_query() to send remaining packets, we queue new reply in the same mbuf queue. And when number of packets is bigger than MLD_MAX_RESPONSE_BURST, we get endless reply of MLDv2 reports. To fix this, add the check for remaining packets in the queue. PR: 204831 MFC after:1 week Sponsored by: Yandex LLC Modified: head/sys/netinet6/mld6.c Modified: head/sys/netinet6/mld6.c == --- head/sys/netinet6/mld6.cTue Dec 1 09:52:41 2015(r291577) +++ head/sys/netinet6/mld6.cTue Dec 1 11:17:41 2015(r291578) @@ -2985,6 +2985,15 @@ mld_v2_dispatch_general_query(struct mld KASSERT(mli->mli_version == MLD_VERSION_2, ("%s: called when version %d", __func__, mli->mli_version)); + /* +* Check that there are some packets queued. If so, send them first. +* For large number of groups the reply to general query can take +* many packets, we should finish sending them before starting of +* queuing the new reply. +*/ + if (mbufq_len(&mli->mli_gq) != 0) + goto send; + ifp = mli->mli_ifp; IF_ADDR_RLOCK(ifp); @@ -3020,6 +3029,7 @@ mld_v2_dispatch_general_query(struct mld } IF_ADDR_RUNLOCK(ifp); +send: mld_dispatch_queue(&mli->mli_gq, MLD_MAX_RESPONSE_BURST); /* ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291579 - head/sys/netinet
Author: ae Date: Tue Dec 1 11:24:30 2015 New Revision: 291579 URL: https://svnweb.freebsd.org/changeset/base/291579 Log: In the same way fix the problem described in r291578 for IGMPv3. In case when router has a lot of multicast groups, the reply can take several packets due to MTU limitation. Also we have a limit IGMP_MAX_RESPONSE_BURST == 4, that limits the number of packets we send in one shot. Then we recalculate the timer value and schedule the remaining packets for sending. The problem is that when we call igmp_v3_dispatch_general_query() to send remaining packets, we queue new reply in the same mbuf queue. And when number of packets is bigger than IGMP_MAX_RESPONSE_BURST, we get endless reply of IGMPv3 reports. To fix this, add the check for remaining packets in the queue. MFC after:1 week Sponsored by: Yandex LLC Modified: head/sys/netinet/igmp.c Modified: head/sys/netinet/igmp.c == --- head/sys/netinet/igmp.c Tue Dec 1 11:17:41 2015(r291578) +++ head/sys/netinet/igmp.c Tue Dec 1 11:24:30 2015(r291579) @@ -3334,6 +3334,15 @@ igmp_v3_dispatch_general_query(struct ig KASSERT(igi->igi_version == IGMP_VERSION_3, ("%s: called when version %d", __func__, igi->igi_version)); + /* +* Check that there are some packets queued. If so, send them first. +* For large number of groups the reply to general query can take +* many packets, we should finish sending them before starting of +* queuing the new reply. +*/ + if (mbufq_len(&igi->igi_gq) != 0) + goto send; + ifp = igi->igi_ifp; IF_ADDR_RLOCK(ifp); @@ -3369,6 +3378,7 @@ igmp_v3_dispatch_general_query(struct ig } IF_ADDR_RUNLOCK(ifp); +send: loop = (igi->igi_flags & IGIF_LOOPBACK) ? 1 : 0; igmp_dispatch_queue(&igi->igi_gq, IGMP_MAX_RESPONSE_BURST, loop); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291580 - head/sys/arm64/include
Author: andrew Date: Tue Dec 1 12:27:36 2015 New Revision: 291580 URL: https://svnweb.freebsd.org/changeset/base/291580 Log: Rework the atomic code to reduce the repetition. This merges some of the atomic functions where they are almost identical, or have acquire/release semantics. While here clean these function up. The cbnz instruction doesn't change the condition flags so drop cc, however they should have memory added to the clobber list. Reviewed by: kib Sponsored by: ABT Systems Ltd Differential Revision:https://reviews.freebsd.org/D4318 Modified: head/sys/arm64/include/atomic.h Modified: head/sys/arm64/include/atomic.h == --- head/sys/arm64/include/atomic.h Tue Dec 1 11:24:30 2015 (r291579) +++ head/sys/arm64/include/atomic.h Tue Dec 1 12:27:36 2015 (r291580) @@ -53,69 +53,135 @@ #definewmb() dmb(st) /* Full system memory barrier store */ #definermb() dmb(ld) /* Full system memory barrier load */ -static __inline void -atomic_add_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldxr%w0, [%2] \n" - " add %w0, %w0, %w3 \n" - " stxr%w1, %w0, [%2] \n" -" cbnz %w1, 1b\n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" - ); -} - -static __inline void -atomic_clear_32(volatile uint32_t *p, uint32_t val) -{ - uint32_t tmp; - int res; - - __asm __volatile( - "1: ldxr%w0, [%2] \n" - " bic %w0, %w0, %w3 \n" - " stxr%w1, %w0, [%2] \n" -" cbnz %w1, 1b\n" - : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" - ); -} +#defineATOMIC_OP(op, asm_op, bar, a, l) \ +static __inline void \ +atomic_##op##_##bar##32(volatile uint32_t *p, uint32_t val)\ +{ \ + uint32_t tmp; \ + int res;\ + \ + __asm __volatile( \ + "1: ld"#a"xr %w0, [%2] \n" \ + " "#asm_op" %w0, %w0, %w3 \n" \ + " st"#l"xr %w1, %w0, [%2] \n" \ +" cbnz %w1, 1b\n" \ + : "=&r"(tmp), "=&r"(res)\ + : "r" (p), "r" (val)\ + : "memory" \ + ); \ +} \ + \ +static __inline void \ +atomic_##op##_##bar##64(volatile uint64_t *p, uint64_t val)\ +{ \ + uint64_t tmp; \ + int res;\ + \ + __asm __volatile( \ + "1: ld"#a"xr %0, [%2] \n"\ + " "#asm_op" %0, %0, %3\n"\ + " st"#l"xr %w1, %0, [%2] \n"\ +" cbnz %w1, 1b \n" \ + : "=&r"(tmp), "=&r"(res)\ + : "r" (p), "r" (val)\ + : "memory" \ + ); \ +} + +#defineATOMIC(op, asm_op) \ +ATOMIC_OP(op, asm_op, , , ) \ +ATOMIC_OP(op, asm_op, acq_, a, ) \ +ATOMIC_OP(op, asm_op, rel_, , l) \ + +ATOMIC(add, add) +ATOMIC(clear,bic) +ATOMIC(set, orr) +ATOMIC(subtract, sub) + +#defineATOMIC_CMPSET(bar, a, l) \ +static __inline int\ +atomic_cmpset_##bar##32(volatile uint32_t *p, uint32_t cmpval, \ +uint32_t newval)
svn commit: r291581 - head/sys/arm64/arm64
Author: andrew Date: Tue Dec 1 12:37:04 2015 New Revision: 291581 URL: https://svnweb.freebsd.org/changeset/base/291581 Log: Rework the exception entry/return functions to make them valid frames to be unwound through. For this we need the frame pointer (x29) to point to the location on the stack where we stored the previous frame pointer, and link register. To simplify this the stack pointer is only adjusted by addition and subtraction, and not through the use of post increment on loads and stores. The updated frame layout is: ++ | lr -- x30 | ++ | fp -- x29 | <-- x29 points at this ++ | Trap frame | | ...| || <-- sp points at this ++ The only difference is the first two items, and setting of x29. Sponsored by: ABT Systems Ltd Modified: head/sys/arm64/arm64/exception.S head/sys/arm64/arm64/genassym.c Modified: head/sys/arm64/arm64/exception.S == --- head/sys/arm64/arm64/exception.STue Dec 1 12:27:36 2015 (r291580) +++ head/sys/arm64/arm64/exception.STue Dec 1 12:37:04 2015 (r291581) @@ -37,29 +37,32 @@ __FBSDID("$FreeBSD$"); mov x18, sp sub sp, sp, #128 .endif - stp x28, x29, [sp, #-16]! - stp x26, x27, [sp, #-16]! - stp x24, x25, [sp, #-16]! - stp x22, x23, [sp, #-16]! - stp x20, x21, [sp, #-16]! - stp x18, x19, [sp, #-16]! - stp x16, x17, [sp, #-16]! - stp x14, x15, [sp, #-16]! - stp x12, x13, [sp, #-16]! - stp x10, x11, [sp, #-16]! - stp x8, x9, [sp, #-16]! - stp x6, x7, [sp, #-16]! - stp x4, x5, [sp, #-16]! - stp x2, x3, [sp, #-16]! - stp x0, x1, [sp, #-16]! + sub sp, sp, #(TF_SIZE + 16) + stp x29, x30, [sp, #(TF_SIZE)] + stp x28, x29, [sp, #(TF_X + 28 * 8)] + stp x26, x27, [sp, #(TF_X + 26 * 8)] + stp x24, x25, [sp, #(TF_X + 24 * 8)] + stp x22, x23, [sp, #(TF_X + 22 * 8)] + stp x20, x21, [sp, #(TF_X + 20 * 8)] + stp x18, x19, [sp, #(TF_X + 18 * 8)] + stp x16, x17, [sp, #(TF_X + 16 * 8)] + stp x14, x15, [sp, #(TF_X + 14 * 8)] + stp x12, x13, [sp, #(TF_X + 12 * 8)] + stp x10, x11, [sp, #(TF_X + 10 * 8)] + stp x8, x9, [sp, #(TF_X + 8 * 8)] + stp x6, x7, [sp, #(TF_X + 6 * 8)] + stp x4, x5, [sp, #(TF_X + 4 * 8)] + stp x2, x3, [sp, #(TF_X + 2 * 8)] + stp x0, x1, [sp, #(TF_X + 0 * 8)] mrs x10, elr_el1 mrs x11, spsr_el1 .if \el == 0 mrs x18, sp_el0 .endif - stp x10, x11, [sp, #-16]! - stp x18, lr, [sp, #-16]! + stp x10, x11, [sp, #(TF_ELR)] + stp x18, lr, [sp, #(TF_SP)] mrs x18, tpidr_el1 + add x29, sp, #(TF_SIZE) .endm .macro restore_registers el @@ -70,33 +73,35 @@ __FBSDID("$FreeBSD$"); * handler. For EL0 exceptions, do_ast already did this. */ .endif - ldp x18, lr, [sp], #16 - ldp x10, x11, [sp], #16 + ldp x18, lr, [sp, #(TF_SP)] + ldp x10, x11, [sp, #(TF_ELR)] .if \el == 0 msr sp_el0, x18 .endif msr spsr_el1, x11 msr elr_el1, x10 - ldp x0, x1, [sp], #16 - ldp x2, x3, [sp], #16 - ldp x4, x5, [sp], #16 - ldp x6, x7, [sp], #16 - ldp x8, x9, [sp], #16 - ldp x10, x11, [sp], #16 - ldp x12, x13, [sp], #16 - ldp x14, x15, [sp], #16 - ldp x16, x17, [sp], #16 + ldp x0, x1, [sp, #(TF_X + 0 * 8)] + ldp x2, x3, [sp, #(TF_X + 2 * 8)] + ldp x4, x5, [sp, #(TF_X + 4 * 8)] + ldp x6, x7, [sp, #(TF_X + 6 * 8)] + ldp x8, x9, [sp, #(TF_X + 8 * 8)] + ldp x10, x11, [sp, #(TF_X + 10 * 8)] + ldp x12, x13, [sp, #(TF_X + 12 * 8)] + ldp x14, x15, [sp, #(TF_X + 14 * 8)] + ldp x16, x17, [sp, #(TF_X + 16 * 8)] .if \el == 0 - ldp x18, x19, [sp], #16 + ldp x18, x19, [sp, #(TF_X + 18 * 8)] .else - ldp xzr, x19, [sp], #16 + ldr x19, [sp, #(TF_X + 19 * 8)] .endif - ldp x20, x21, [sp], #16 - ldp x22, x23, [sp], #16 - ldp x24, x25, [sp], #16 - ldp x26, x27, [sp], #16 - ldp x28, x29, [sp], #16 -.if \el == 1 + ldp x20, x21, [sp, #(TF_X + 20 * 8)] + ldp x22, x23, [sp, #(TF_X + 22 * 8)] + ldp x24, x25, [sp, #(TF_X + 24 * 8)] + ldp x26, x27, [sp, #(TF_X + 26 * 8)] + ldp x28, x29, [sp, #(TF_X + 28 * 8)] +.if \el == 0 + add sp, sp, #(TF_SIZE + 16) +.else mov sp, x18 mrs x18, tpidr_el1 .endif Modified:
svn commit: r291582 - head/etc/rc.d
Author: des Date: Tue Dec 1 13:20:21 2015 New Revision: 291582 URL: https://svnweb.freebsd.org/changeset/base/291582 Log: Load our configuration before setting defaults, so local_unbound_workdir actually has an effect. PR: 204931 Submitted by: Eugene Grosbein MFC after:1 week Modified: head/etc/rc.d/local_unbound Modified: head/etc/rc.d/local_unbound == --- head/etc/rc.d/local_unbound Tue Dec 1 12:37:04 2015(r291581) +++ head/etc/rc.d/local_unbound Tue Dec 1 13:20:21 2015(r291582) @@ -24,6 +24,8 @@ configtest_cmd="local_unbound_configtest setup_cmd="local_unbound_setup" pidfile="/var/run/${name}.pid" +load_rc_config $name + : ${local_unbound_workdir:=/var/unbound} : ${local_unbound_config:=${local_unbound_workdir}/unbound.conf} : ${local_unbound_flags:="-c ${local_unbound_config}"} @@ -32,8 +34,6 @@ pidfile="/var/run/${name}.pid" : ${local_unbound_anchor:=${local_unbound_workdir}/root.key} : ${local_unbound_forwarders:=} -load_rc_config $name - do_as_unbound() { echo "$@" | su -m unbound ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291583 - head/usr.bin/rctl
Author: trasz Date: Tue Dec 1 14:02:14 2015 New Revision: 291583 URL: https://svnweb.freebsd.org/changeset/base/291583 Log: Fix rctl rule filters - eg the 'rctl -r :' case. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c == --- head/usr.bin/rctl/rctl.cTue Dec 1 13:20:21 2015(r291582) +++ head/usr.bin/rctl/rctl.cTue Dec 1 14:02:14 2015(r291583) @@ -111,22 +111,38 @@ parse_group(const char *s, id_t *gidp, c * Replace human-readable number with its expanded form. */ static char * -expand_amount(char *rule, const char *unexpanded_rule) +expand_amount(const char *rule, const char *unexpanded_rule) { uint64_t num; const char *subject, *subject_id, *resource, *action, *amount, *per; - char *expanded; + char *copy, *expanded, *tofree; int ret; - subject = strsep(&rule, ":"); - subject_id = strsep(&rule, ":"); - resource = strsep(&rule, ":"); - action = strsep(&rule, "=/"); - amount = strsep(&rule, "/"); - per = rule; + tofree = copy = strdup(rule); + if (copy == NULL) { + warn("strdup"); + return (NULL); + } - if (amount == NULL || strlen(amount) == 0) - return (rule); + subject = strsep(©, ":"); + subject_id = strsep(©, ":"); + resource = strsep(©, ":"); + action = strsep(©, "=/"); + amount = strsep(©, "/"); + per = copy; + + if (amount == NULL || strlen(amount) == 0) { + /* +* The "copy" has already been tinkered with by strsep(). +*/ + free(tofree); + copy = strdup(rule); + if (copy == NULL) { + warn("strdup"); + return (NULL); + } + return (copy); + } assert(subject != NULL); assert(subject_id != NULL); @@ -136,6 +152,7 @@ expand_amount(char *rule, const char *un if (expand_number(amount, &num)) { warnx("malformed rule '%s': invalid numeric value '%s'", unexpanded_rule, amount); + free(tofree); return (NULL); } @@ -149,9 +166,12 @@ expand_amount(char *rule, const char *un if (ret <= 0) { warn("asprintf"); + free(tofree); return (NULL); } + free(tofree); + return (expanded); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r291566 - in head: . lib/libelf
On Tue, Dec 01, 2015 at 06:09:22AM +, Garrett Cooper wrote: > Author: ngie > Date: Tue Dec 1 06:09:22 2015 > New Revision: 291566 > URL: https://svnweb.freebsd.org/changeset/base/291566 > > Log: > Move libelf.so.2 from /usr/lib to /lib to unbreak libkvm use after r291406 > > Tested with the following commands as root: > - yes | make delete-old > - service ldconfig restart > - netstat -nr > > X-MFC with: r291406 > Reviewed by: jhb, kib > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/ObsoleteFiles.inc > head/lib/libelf/Makefile > > Modified: head/ObsoleteFiles.inc > == > --- head/ObsoleteFiles.incTue Dec 1 05:59:53 2015(r291565) > +++ head/ObsoleteFiles.incTue Dec 1 06:09:22 2015(r291566) > @@ -38,6 +38,8 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406) > +OLD_FILES+=usr/lib/libelf.so.2 Apparently this is wrong. It should be OLD_LIBS. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291584 - head/sys/dev/sfxge
Author: arybchik Date: Tue Dec 1 14:55:24 2015 New Revision: 291584 URL: https://svnweb.freebsd.org/changeset/base/291584 Log: sfxge: parse packets for TSO early in if_transmit Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D4309 Modified: head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge_tx.c == --- head/sys/dev/sfxge/sfxge_tx.c Tue Dec 1 14:02:14 2015 (r291583) +++ head/sys/dev/sfxge/sfxge_tx.c Tue Dec 1 14:55:24 2015 (r291584) @@ -710,6 +710,84 @@ sfxge_if_qflush(struct ifnet *ifp) sfxge_tx_qdpl_flush(sc->txq[i]); } +#if SFXGE_TX_PARSE_EARLY + +/* There is little space for user data in mbuf pkthdr, so we + * use l*hlen fields which are not used by the driver otherwise + * to store header offsets. + * The fields are 8-bit, but it's ok, no header may be longer than 255 bytes. + */ + + +#define TSO_MBUF_PROTO(_mbuf)((_mbuf)->m_pkthdr.PH_loc.sixteen[0]) +/* We abuse l5hlen here because PH_loc can hold only 64 bits of data */ +#define TSO_MBUF_FLAGS(_mbuf)((_mbuf)->m_pkthdr.l5hlen) +#define TSO_MBUF_PACKETID(_mbuf) ((_mbuf)->m_pkthdr.PH_loc.sixteen[1]) +#define TSO_MBUF_SEQNUM(_mbuf) ((_mbuf)->m_pkthdr.PH_loc.thirtytwo[1]) + +static void sfxge_parse_tx_packet(struct mbuf *mbuf) +{ + struct ether_header *eh = mtod(mbuf, struct ether_header *); + const struct tcphdr *th; + struct tcphdr th_copy; + + /* Find network protocol and header */ + TSO_MBUF_PROTO(mbuf) = eh->ether_type; + if (TSO_MBUF_PROTO(mbuf) == htons(ETHERTYPE_VLAN)) { + struct ether_vlan_header *veh = + mtod(mbuf, struct ether_vlan_header *); + TSO_MBUF_PROTO(mbuf) = veh->evl_proto; + mbuf->m_pkthdr.l2hlen = sizeof(*veh); + } else { + mbuf->m_pkthdr.l2hlen = sizeof(*eh); + } + + /* Find TCP header */ + if (TSO_MBUF_PROTO(mbuf) == htons(ETHERTYPE_IP)) { + const struct ip *iph = (const struct ip *)mtodo(mbuf, mbuf->m_pkthdr.l2hlen); + + KASSERT(iph->ip_p == IPPROTO_TCP, + ("TSO required on non-TCP packet")); + mbuf->m_pkthdr.l3hlen = mbuf->m_pkthdr.l2hlen + 4 * iph->ip_hl; + TSO_MBUF_PACKETID(mbuf) = iph->ip_id; + } else { + KASSERT(TSO_MBUF_PROTO(mbuf) == htons(ETHERTYPE_IPV6), + ("TSO required on non-IP packet")); + KASSERT(((const struct ip6_hdr *)mtodo(mbuf, mbuf->m_pkthdr.l2hlen))->ip6_nxt == + IPPROTO_TCP, + ("TSO required on non-TCP packet")); + mbuf->m_pkthdr.l3hlen = mbuf->m_pkthdr.l2hlen + sizeof(struct ip6_hdr); + TSO_MBUF_PACKETID(mbuf) = 0; + } + + KASSERT(mbuf->m_len >= mbuf->m_pkthdr.l3hlen, + ("network header is fragmented in mbuf")); + + /* We need TCP header including flags (window is the next) */ + if (mbuf->m_len < mbuf->m_pkthdr.l3hlen + offsetof(struct tcphdr, th_win)) { + m_copydata(mbuf, mbuf->m_pkthdr.l3hlen, sizeof(th_copy), + (caddr_t)&th_copy); + th = &th_copy; + } else { + th = (const struct tcphdr *)mtodo(mbuf, mbuf->m_pkthdr.l3hlen); + } + + mbuf->m_pkthdr.l4hlen = mbuf->m_pkthdr.l3hlen + 4 * th->th_off; + TSO_MBUF_SEQNUM(mbuf) = ntohl(th->th_seq); + + /* These flags must not be duplicated */ + /* +* RST should not be duplicated as well, but FreeBSD kernel +* generates TSO packets with RST flag. So, do not assert +* its absence. +*/ + KASSERT(!(th->th_flags & (TH_URG | TH_SYN)), + ("incompatible TCP flag 0x%x on TSO packet", +th->th_flags & (TH_URG | TH_SYN))); + TSO_MBUF_FLAGS(mbuf) = th->th_flags; +} +#endif + /* * TX start -- called by the stack. */ @@ -744,6 +822,10 @@ sfxge_if_transmit(struct ifnet *ifp, str index = sc->rx_indir_table[hash % SFXGE_RX_SCALE_MAX]; } +#if SFXGE_TX_PARSE_EARLY + if (m->m_pkthdr.csum_flags & CSUM_TSO) + sfxge_parse_tx_packet(m); +#endif txq = sc->txq[SFXGE_TXQ_IP_TCP_UDP_CKSUM + index]; } else if (m->m_pkthdr.csum_flags & CSUM_DELAY_IP) { txq = sc->txq[SFXGE_TXQ_IP_CKSUM]; @@ -781,26 +863,32 @@ struct sfxge_tso_state { unsigned seg_size; /* TCP segment size */ int fw_assisted;/* Use FW-assisted TSO */ u_short packet_id; /* IPv4 packet ID from the original packet */ + uint8_t tcp_flags; /* TCP flags */ efx_desc_t header_desc; /* Precomputed header d
svn commit: r291585 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue Dec 1 15:26:46 2015 New Revision: 291585 URL: https://svnweb.freebsd.org/changeset/base/291585 Log: sfxge: support MAC spoofing for 4.2.x firmare Common code should infer other privileges from Admin privilege to support firmware that pre-dates introduction of specific privilege flags. Submitted by: Richard Houldsworth Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4327 Modified: head/sys/dev/sfxge/common/hunt_mcdi.c Modified: head/sys/dev/sfxge/common/hunt_mcdi.c == --- head/sys/dev/sfxge/common/hunt_mcdi.c Tue Dec 1 14:55:24 2015 (r291584) +++ head/sys/dev/sfxge/common/hunt_mcdi.c Tue Dec 1 15:26:46 2015 (r291585) @@ -435,7 +435,11 @@ hunt_mcdi_fw_update_supported( EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON); - /* use privilege mask state at MCDI attach */ + /* +* Use privilege mask state at MCDI attach. +* Admin privilege must be used prior to introduction of +* specific flag. +*/ *supportedp = (encp->enc_privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) == MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN; @@ -449,13 +453,20 @@ hunt_mcdi_macaddr_change_supported( __out boolean_t *supportedp) { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); + uint32_t privilege_mask = encp->enc_privilege_mask; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON); - /* use privilege mask state at MCDI attach */ - *supportedp = (encp->enc_privilege_mask & - MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) - == MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING; + /* +* Use privilege mask state at MCDI attach. +* Admin privilege must be used prior to introduction of +* specific flag (at v4.6). +*/ + *supportedp = + ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) == + MC_CMD_PRIVILEGE_MASK_IN_GRP_MAC_SPOOFING) || + ((privilege_mask & MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN) == + MC_CMD_PRIVILEGE_MASK_IN_GRP_ADMIN); return (0); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291586 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue Dec 1 15:29:51 2015 New Revision: 291586 URL: https://svnweb.freebsd.org/changeset/base/291586 Log: sfxge: allow VFs to have locally administered MAC addresses Submitted by: Mark Spender Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4328 Modified: head/sys/dev/sfxge/common/hunt_nic.c Modified: head/sys/dev/sfxge/common/hunt_nic.c == --- head/sys/dev/sfxge/common/hunt_nic.cTue Dec 1 15:26:46 2015 (r291585) +++ head/sys/dev/sfxge/common/hunt_nic.cTue Dec 1 15:29:51 2015 (r291586) @@ -1071,18 +1071,18 @@ hunt_board_cfg( /* MAC address for this function */ if (EFX_PCI_FUNCTION_IS_PF(encp)) { rc = efx_mcdi_get_mac_address_pf(enp, mac_addr); + if ((rc == 0) && (mac_addr[0] & 0x02)) { + /* +* If the static config does not include a global MAC +* address pool then the board may return a locally +* administered MAC address (this should only happen on +* incorrectly programmed boards). +*/ + rc = EINVAL; + } } else { rc = efx_mcdi_get_mac_address_vf(enp, mac_addr); } - if ((rc == 0) && (mac_addr[0] & 0x02)) { - /* -* If the static config does not include a global MAC address -* pool then the board may return a locally administered MAC -* address (this should only happen on incorrectly programmed -* boards). -*/ - rc = EINVAL; - } if (rc != 0) goto fail4; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291587 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue Dec 1 15:32:37 2015 New Revision: 291587 URL: https://svnweb.freebsd.org/changeset/base/291587 Log: sfxge: FPGA and FPGA backup (diagnostic) partitions added to hunt_parttbl It allows manftest to program them. Submitted by: Paul Fox Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4329 Modified: head/sys/dev/sfxge/common/hunt_nvram.c Modified: head/sys/dev/sfxge/common/hunt_nvram.c == --- head/sys/dev/sfxge/common/hunt_nvram.c Tue Dec 1 15:29:51 2015 (r291586) +++ head/sys/dev/sfxge/common/hunt_nvram.c Tue Dec 1 15:32:37 2015 (r291587) @@ -1490,7 +1490,15 @@ static hunt_parttbl_entry_t hunt_parttbl {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 1, EFX_NVRAM_DYNAMIC_CFG}, {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 2, EFX_NVRAM_DYNAMIC_CFG}, {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 3, EFX_NVRAM_DYNAMIC_CFG}, - {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 4, EFX_NVRAM_DYNAMIC_CFG} + {NVRAM_PARTITION_TYPE_DYNAMIC_CONFIG, 4, EFX_NVRAM_DYNAMIC_CFG}, + {NVRAM_PARTITION_TYPE_FPGA,1, EFX_NVRAM_FPGA}, + {NVRAM_PARTITION_TYPE_FPGA,2, EFX_NVRAM_FPGA}, + {NVRAM_PARTITION_TYPE_FPGA,3, EFX_NVRAM_FPGA}, + {NVRAM_PARTITION_TYPE_FPGA,4, EFX_NVRAM_FPGA}, + {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 1, EFX_NVRAM_FPGA_BACKUP}, + {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 2, EFX_NVRAM_FPGA_BACKUP}, + {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 3, EFX_NVRAM_FPGA_BACKUP}, + {NVRAM_PARTITION_TYPE_FPGA_BACKUP, 4, EFX_NVRAM_FPGA_BACKUP} }; static __checkReturn hunt_parttbl_entry_t * ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291588 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue Dec 1 15:38:39 2015 New Revision: 291588 URL: https://svnweb.freebsd.org/changeset/base/291588 Log: sfxge: add function to query link control privilege Make link control privilege visible to OS driver to guard updates to flow control and PHY advertised capabilities. Submitted by: Richard Houldsworth Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4330 Modified: head/sys/dev/sfxge/common/efx_impl.h head/sys/dev/sfxge/common/efx_mcdi.c head/sys/dev/sfxge/common/efx_mcdi.h head/sys/dev/sfxge/common/hunt_impl.h head/sys/dev/sfxge/common/hunt_mcdi.c head/sys/dev/sfxge/common/siena_impl.h head/sys/dev/sfxge/common/siena_mcdi.c Modified: head/sys/dev/sfxge/common/efx_impl.h == --- head/sys/dev/sfxge/common/efx_impl.hTue Dec 1 15:32:37 2015 (r291587) +++ head/sys/dev/sfxge/common/efx_impl.hTue Dec 1 15:38:39 2015 (r291588) @@ -462,6 +462,7 @@ typedef struct efx_mcdi_ops_s { void(*emco_fini)(efx_nic_t *); efx_rc_t(*emco_fw_update_supported)(efx_nic_t *, boolean_t *); efx_rc_t(*emco_macaddr_change_supported)(efx_nic_t *, boolean_t *); + efx_rc_t(*emco_link_control_supported)(efx_nic_t *, boolean_t *); } efx_mcdi_ops_t; typedef struct efx_mcdi_s { Modified: head/sys/dev/sfxge/common/efx_mcdi.c == --- head/sys/dev/sfxge/common/efx_mcdi.cTue Dec 1 15:32:37 2015 (r291587) +++ head/sys/dev/sfxge/common/efx_mcdi.cTue Dec 1 15:38:39 2015 (r291588) @@ -53,6 +53,8 @@ static efx_mcdi_ops_t __efx_mcdi_siena_o siena_mcdi_fw_update_supported, /* emco_fw_update_supported */ siena_mcdi_macaddr_change_supported, /* emco_macaddr_change_supported */ + siena_mcdi_link_control_supported, + /* emco_link_control_supported */ }; #endif /* EFSYS_OPT_SIENA */ @@ -69,6 +71,8 @@ static efx_mcdi_ops_t __efx_mcdi_hunt_op hunt_mcdi_fw_update_supported, /* emco_fw_update_supported */ hunt_mcdi_macaddr_change_supported, /* emco_macaddr_change_supported */ + hunt_mcdi_link_control_supported, + /* emco_link_control_supported */ }; #endif /* EFSYS_OPT_HUNTINGTON */ @@ -1169,6 +1173,31 @@ fail1: return (rc); } + __checkReturn efx_rc_t +efx_mcdi_link_control_supported( + __inefx_nic_t *enp, + __out boolean_t *supportedp) +{ + efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop; + efx_rc_t rc; + + if (emcop != NULL && emcop->emco_link_control_supported != NULL) { + if ((rc = emcop->emco_link_control_supported(enp, supportedp)) + != 0) + goto fail1; + } else { + /* Earlier devices always supported link control */ + *supportedp = B_TRUE; + } + + return (0); + +fail1: + EFSYS_PROBE1(fail1, efx_rc_t, rc); + + return (rc); +} + #if EFSYS_OPT_BIST #if EFSYS_OPT_HUNTINGTON Modified: head/sys/dev/sfxge/common/efx_mcdi.h == --- head/sys/dev/sfxge/common/efx_mcdi.hTue Dec 1 15:32:37 2015 (r291587) +++ head/sys/dev/sfxge/common/efx_mcdi.hTue Dec 1 15:38:39 2015 (r291588) @@ -151,6 +151,11 @@ efx_mcdi_macaddr_change_supported( __inefx_nic_t *enp, __out boolean_t *supportedp); +extern __checkReturn efx_rc_t +efx_mcdi_link_control_supported( + __inefx_nic_t *enp, + __out boolean_t *supportedp); + #if EFSYS_OPT_BIST #if EFSYS_OPT_HUNTINGTON extern __checkReturn efx_rc_t Modified: head/sys/dev/sfxge/common/hunt_impl.h == --- head/sys/dev/sfxge/common/hunt_impl.h Tue Dec 1 15:32:37 2015 (r291587) +++ head/sys/dev/sfxge/common/hunt_impl.h Tue Dec 1 15:38:39 2015 (r291588) @@ -286,6 +286,11 @@ hunt_mcdi_macaddr_change_supported( __inefx_nic_t *enp, __out boolean_t *supportedp); +extern __checkReturn efx_rc_t +hunt_mcdi_link_control_supported( + __inefx_nic_t *enp, + __out boolean_t *supportedp); + #endif /* EFSYS_OPT_MCDI */ /* NVRAM */ Modified: head/sys/dev/sfxge/common/hunt_mcdi.c == --- head/sys/dev/sfxge/common/hunt_mcdi.c Tue Dec 1 15:32:37 2015 (r291587)
svn commit: r291589 - head/share/mk
Author: bdrewery Date: Tue Dec 1 15:50:35 2015 New Revision: 291589 URL: https://svnweb.freebsd.org/changeset/base/291589 Log: FAST_DEPEND: Actually use -MP from DEPEND_MP, completing r291554. X-MFC-With: r291554 MFC after:1 week Pointyhat to: bdrewery Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkTue Dec 1 15:38:39 2015(r291588) +++ head/share/mk/bsd.dep.mkTue Dec 1 15:50:35 2015(r291589) @@ -63,7 +63,7 @@ DEPEND_MP?= -MP # Handle OBJS=../somefile.o hacks. Just replace '/' rather than use :T to # avoid collisions. DEPEND_FILTER= C,/,_,g -DEPEND_CFLAGS+=-MD -MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}} +DEPEND_CFLAGS+=-MD ${DEPEND_MP} -MF${DEPENDFILE}.${.TARGET:${DEPEND_FILTER}} DEPEND_CFLAGS+=-MT${.TARGET} CFLAGS+= ${DEPEND_CFLAGS} DEPENDOBJS+= ${OBJS} ${POBJS} ${SOBJS} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291591 - head
Author: bdrewery Date: Tue Dec 1 15:55:20 2015 New Revision: 291591 URL: https://svnweb.freebsd.org/changeset/base/291591 Log: Fix removal of libelf.so.2 and add missing files for it. X-MFC-With: r291566 Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Tue Dec 1 15:54:46 2015(r291590) +++ head/ObsoleteFiles.inc Tue Dec 1 15:55:20 2015(r291591) @@ -39,7 +39,10 @@ # done # 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406) -OLD_FILES+=usr/lib/libelf.so.2 +OLD_LIBS+=usr/lib/libelf.so.2 +OLD_FILES+=usr/lib/libelf.a +OLD_FILES+=usr/lib/libelf.so +OLD_FILES+=usr/lib/libelf_p.a # 20151115: Fox bad upgrade scheme OLD_FILES+=usr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030 OLD_FILES+=usr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291590 - head/sys/dev/sfxge/common
Author: arybchik Date: Tue Dec 1 15:54:46 2015 New Revision: 291590 URL: https://svnweb.freebsd.org/changeset/base/291590 Log: sfxge: retry VF vAdaptor allocation if it fails because of no EVB port yet After an MC reboot, a VF driver may reset before the PF driver has finished bringing everything back up. This includes the VFs EVB port. MC_CMD_VADAPTOR_ALLOC is the first MCDI call after an MC reboot to require the EVB port, so if it fails with MC_CMD_ERR_NO_EVB_PORT, retry the command a few times after waiting a while. Submitted by: Mark Spender Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D4333 Modified: head/sys/dev/sfxge/common/hunt_nic.c Modified: head/sys/dev/sfxge/common/hunt_nic.c == --- head/sys/dev/sfxge/common/hunt_nic.cTue Dec 1 15:50:35 2015 (r291589) +++ head/sys/dev/sfxge/common/hunt_nic.cTue Dec 1 15:54:46 2015 (r291590) @@ -1532,6 +1532,8 @@ hunt_nic_init( uint32_t min_vi_count, max_vi_count; uint32_t vi_count, vi_base; uint32_t i; + uint32_t retry; + uint32_t delay_us; efx_rc_t rc; EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_HUNTINGTON); @@ -1622,14 +1624,48 @@ hunt_nic_init( } } - /* Allocate a vAdapter attached to our upstream vPort/pPort */ - if ((rc = efx_mcdi_vadaptor_alloc(enp, EVB_PORT_ID_ASSIGNED)) != 0) - goto fail5; + /* +* Allocate a vAdaptor attached to our upstream vPort/pPort. +* +* On a VF, this may fail with MC_CMD_ERR_NO_EVB_PORT (ENOENT) if the PF +* driver has yet to bring up the EVB port. See bug 56147. In this case, +* retry the request several times after waiting a while. The wait time +* between retries starts small (10ms) and exponentially increases. +* Total wait time is a little over two seconds. Retry logic in the +* client driver may mean this whole loop is repeated if it continues to +* fail. +*/ + retry = 0; + delay_us = 1; + while ((rc = efx_mcdi_vadaptor_alloc(enp, EVB_PORT_ID_ASSIGNED)) != 0) { + if (EFX_PCI_FUNCTION_IS_PF(&enp->en_nic_cfg) || + (rc != ENOENT)) { + /* +* Do not retry alloc for PF, or for other errors on +* a VF. +*/ + goto fail5; + } + + /* VF startup before PF is ready. Retry allocation. */ + if (retry > 5) { + /* Too many attempts */ + rc = EINVAL; + goto fail6; + } + EFSYS_PROBE1(mcdi_no_evb_port_retry, int, retry); + EFSYS_SLEEP(delay_us); + retry++; + if (delay_us < 50) + delay_us <<= 2; + } enp->en_vport_id = EVB_PORT_ID_ASSIGNED; return (0); +fail6: + EFSYS_PROBE(fail6); fail5: EFSYS_PROBE(fail5); fail4: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r291566 - in head: . lib/libelf
On 12/1/2015 6:16 AM, Konstantin Belousov wrote: > On Tue, Dec 01, 2015 at 06:09:22AM +, Garrett Cooper wrote: >> Author: ngie >> Date: Tue Dec 1 06:09:22 2015 >> New Revision: 291566 >> URL: https://svnweb.freebsd.org/changeset/base/291566 >> >> Log: >> Move libelf.so.2 from /usr/lib to /lib to unbreak libkvm use after r291406 >> >> Tested with the following commands as root: >> - yes | make delete-old >> - service ldconfig restart >> - netstat -nr >> >> X-MFC with: r291406 >> Reviewed by: jhb, kib >> Sponsored by: EMC / Isilon Storage Division >> >> Modified: >> head/ObsoleteFiles.inc >> head/lib/libelf/Makefile >> >> Modified: head/ObsoleteFiles.inc >> == >> --- head/ObsoleteFiles.inc Tue Dec 1 05:59:53 2015(r291565) >> +++ head/ObsoleteFiles.inc Tue Dec 1 06:09:22 2015(r291566) >> @@ -38,6 +38,8 @@ >> # xargs -n1 | sort | uniq -d; >> # done >> >> +# 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in >> r291406) >> +OLD_FILES+=usr/lib/libelf.so.2 > Apparently this is wrong. It should be OLD_LIBS. > Yes. Fixed in r291591. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r291593 - head/lib/libelf
Author: bdrewery Date: Tue Dec 1 16:08:38 2015 New Revision: 291593 URL: https://svnweb.freebsd.org/changeset/base/291593 Log: Correct r291566 for defining SHLIBDIR. This must happen before including bsd.own.mk which sets the default to /usr/lib. X-MFC-With: r291566 Reported by: Max N. Boyarov Modified: head/lib/libelf/Makefile Modified: head/lib/libelf/Makefile == --- head/lib/libelf/MakefileTue Dec 1 16:04:50 2015(r291592) +++ head/lib/libelf/MakefileTue Dec 1 16:08:38 2015(r291593) @@ -1,4 +1,7 @@ # $FreeBSD$ + +SHLIBDIR?= /lib + .include TOP= ${.CURDIR}/../../contrib/elftoolchain @@ -7,7 +10,6 @@ SRCDIR=${TOP}/libelf .PATH: ${SRCDIR} LIB= elf -SHLIBDIR?= /lib SRCS= elf.c \ elf_begin.c \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291592 - head/usr.bin/netstat
Author: ume Date: Tue Dec 1 16:04:50 2015 New Revision: 291592 URL: https://svnweb.freebsd.org/changeset/base/291592 Log: At the time a destination or a gateway of `netstat -r' protrudes its field, narrow the next field to raise readability bit. Modified: head/usr.bin/netstat/route.c Modified: head/usr.bin/netstat/route.c == --- head/usr.bin/netstat/route.cTue Dec 1 15:55:20 2015 (r291591) +++ head/usr.bin/netstat/route.cTue Dec 1 16:04:50 2015 (r291592) @@ -107,7 +107,7 @@ static const char *netname4(in_addr_t, i static const char *netname6(struct sockaddr_in6 *, struct sockaddr_in6 *); static void p_rtable_sysctl(int, int); static void p_rtentry_sysctl(const char *name, struct rt_msghdr *); -static void p_sockaddr(const char *name, struct sockaddr *, struct sockaddr *, +static int p_sockaddr(const char *name, struct sockaddr *, struct sockaddr *, int, int); static const char *fmt_sockaddr(struct sockaddr *sa, struct sockaddr *mask, int flags); @@ -352,7 +352,7 @@ p_rtentry_sysctl(const char *name, struc struct sockaddr *sa, *addr[RTAX_MAX]; char buffer[128]; char prettyname[128]; - int i; + int i, protrusion; xo_open_instance(name); sa = (struct sockaddr *)(rtm + 1); @@ -362,11 +362,13 @@ p_rtentry_sysctl(const char *name, struc sa = (struct sockaddr *)((char *)sa + SA_SIZE(sa)); } - p_sockaddr("destination", addr[RTAX_DST], addr[RTAX_NETMASK], + protrusion = p_sockaddr("destination", addr[RTAX_DST], + addr[RTAX_NETMASK], rtm->rtm_flags, wid_dst); - p_sockaddr("gateway", addr[RTAX_GATEWAY], NULL, RTF_HOST, wid_gw); + protrusion = p_sockaddr("gateway", addr[RTAX_GATEWAY], NULL, RTF_HOST, + wid_gw - protrusion); snprintf(buffer, sizeof(buffer), "{[:-%d}{:flags/%%s}{]:} ", - wid_flags); + wid_flags - protrusion); p_flags(rtm->rtm_flags, buffer); if (Wflag) { xo_emit("{t:use/%*lu} ", wid_pksent, rtm->rtm_rmx.rmx_pksent); @@ -402,12 +404,13 @@ p_rtentry_sysctl(const char *name, struc xo_close_instance(name); } -static void +static int p_sockaddr(const char *name, struct sockaddr *sa, struct sockaddr *mask, int flags, int width) { const char *cp; char buf[128]; + int protrusion; cp = fmt_sockaddr(sa, mask, flags); @@ -419,12 +422,17 @@ p_sockaddr(const char *name, struct sock snprintf(buf, sizeof(buf), "{[:%d}{:%s/%%s}{]:} ", -width, name); xo_emit(buf, cp); + protrusion = strlen(cp) - width; + if (protrusion < 0) + protrusion = 0; } else { snprintf(buf, sizeof(buf), "{[:%d}{:%s/%%-.*s}{]:} ", -width, name); xo_emit(buf, width, cp); + protrusion = 0; } } + return (protrusion); } static const char * ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r291592 - head/usr.bin/netstat
Hi ume, The value returned by p_sockaddr("destination", ...) is saved to "protrusion", but it is never used before it is overwritten by the value returned by p_sockaddr("gateway", ...). That doesn't seem right. Thanks, Ravi (rpokala@) -Original Message- From: on behalf of Hajimu UMEMOTO Date: 2015-12-01, Tuesday at 08:04 To: , , Subject: svn commit: r291592 - head/usr.bin/netstat >Author: ume >Date: Tue Dec 1 16:04:50 2015 >New Revision: 291592 >URL: https://svnweb.freebsd.org/changeset/base/291592 > >Log: > At the time a destination or a gateway of `netstat -r' > protrudes its field, narrow the next field to raise > readability bit. > >Modified: > head/usr.bin/netstat/route.c > >Modified: head/usr.bin/netstat/route.c >== >--- head/usr.bin/netstat/route.c Tue Dec 1 15:55:20 2015 >(r291591) >+++ head/usr.bin/netstat/route.c Tue Dec 1 16:04:50 2015 >(r291592) >@@ -107,7 +107,7 @@ static const char *netname4(in_addr_t, i > static const char *netname6(struct sockaddr_in6 *, struct sockaddr_in6 *); > static void p_rtable_sysctl(int, int); > static void p_rtentry_sysctl(const char *name, struct rt_msghdr *); >-static void p_sockaddr(const char *name, struct sockaddr *, struct sockaddr *, >+static int p_sockaddr(const char *name, struct sockaddr *, struct sockaddr *, > int, int); > static const char *fmt_sockaddr(struct sockaddr *sa, struct sockaddr *mask, > int flags); >@@ -352,7 +352,7 @@ p_rtentry_sysctl(const char *name, struc > struct sockaddr *sa, *addr[RTAX_MAX]; > char buffer[128]; > char prettyname[128]; >- int i; >+ int i, protrusion; > > xo_open_instance(name); > sa = (struct sockaddr *)(rtm + 1); >@@ -362,11 +362,13 @@ p_rtentry_sysctl(const char *name, struc > sa = (struct sockaddr *)((char *)sa + SA_SIZE(sa)); > } > >- p_sockaddr("destination", addr[RTAX_DST], addr[RTAX_NETMASK], >+ protrusion = p_sockaddr("destination", addr[RTAX_DST], >+ addr[RTAX_NETMASK], > rtm->rtm_flags, wid_dst); >- p_sockaddr("gateway", addr[RTAX_GATEWAY], NULL, RTF_HOST, wid_gw); >+ protrusion = p_sockaddr("gateway", addr[RTAX_GATEWAY], NULL, RTF_HOST, >+ wid_gw - protrusion); > snprintf(buffer, sizeof(buffer), "{[:-%d}{:flags/%%s}{]:} ", >- wid_flags); >+ wid_flags - protrusion); > p_flags(rtm->rtm_flags, buffer); > if (Wflag) { > xo_emit("{t:use/%*lu} ", wid_pksent, rtm->rtm_rmx.rmx_pksent); >@@ -402,12 +404,13 @@ p_rtentry_sysctl(const char *name, struc > xo_close_instance(name); > } > >-static void >+static int > p_sockaddr(const char *name, struct sockaddr *sa, struct sockaddr *mask, > int flags, int width) > { > const char *cp; > char buf[128]; >+ int protrusion; > > cp = fmt_sockaddr(sa, mask, flags); > >@@ -419,12 +422,17 @@ p_sockaddr(const char *name, struct sock > snprintf(buf, sizeof(buf), "{[:%d}{:%s/%%s}{]:} ", > -width, name); > xo_emit(buf, cp); >+ protrusion = strlen(cp) - width; >+ if (protrusion < 0) >+ protrusion = 0; > } else { > snprintf(buf, sizeof(buf), "{[:%d}{:%s/%%-.*s}{]:} ", > -width, name); > xo_emit(buf, width, cp); >+ protrusion = 0; > } > } >+ return (protrusion); > } > > static const char * > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r291591 - head
On Tue, Dec 01, 2015 at 03:55:20PM +, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Dec 1 15:55:20 2015 > New Revision: 291591 > URL: https://svnweb.freebsd.org/changeset/base/291591 > > Log: > Fix removal of libelf.so.2 and add missing files for it. > > X-MFC-With: r291566 > > Modified: > head/ObsoleteFiles.inc > > Modified: head/ObsoleteFiles.inc > == > --- head/ObsoleteFiles.incTue Dec 1 15:54:46 2015(r291590) > +++ head/ObsoleteFiles.incTue Dec 1 15:55:20 2015(r291591) > @@ -39,7 +39,10 @@ > # done > > # 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406) > -OLD_FILES+=usr/lib/libelf.so.2 > +OLD_LIBS+=usr/lib/libelf.so.2 > +OLD_FILES+=usr/lib/libelf.a > +OLD_FILES+=usr/lib/libelf.so > +OLD_FILES+=usr/lib/libelf_p.a Why ? libelf is not removed, it is moved. libelf.so link and libelf.a (and _p.a) should be left as is. > # 20151115: Fox bad upgrade scheme > OLD_FILES+=usr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030 > OLD_FILES+=usr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r291591 - head
On 12/1/2015 8:14 AM, Konstantin Belousov wrote: > On Tue, Dec 01, 2015 at 03:55:20PM +, Bryan Drewery wrote: >> Author: bdrewery >> Date: Tue Dec 1 15:55:20 2015 >> New Revision: 291591 >> URL: https://svnweb.freebsd.org/changeset/base/291591 >> >> Log: >> Fix removal of libelf.so.2 and add missing files for it. >> >> X-MFC-With:r291566 >> >> Modified: >> head/ObsoleteFiles.inc >> >> Modified: head/ObsoleteFiles.inc >> == >> --- head/ObsoleteFiles.inc Tue Dec 1 15:54:46 2015(r291590) >> +++ head/ObsoleteFiles.inc Tue Dec 1 15:55:20 2015(r291591) >> @@ -39,7 +39,10 @@ >> # done >> >> # 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in >> r291406) >> -OLD_FILES+=usr/lib/libelf.so.2 >> +OLD_LIBS+=usr/lib/libelf.so.2 >> +OLD_FILES+=usr/lib/libelf.a >> +OLD_FILES+=usr/lib/libelf.so >> +OLD_FILES+=usr/lib/libelf_p.a > Why ? libelf is not removed, it is moved. libelf.so link and libelf.a > (and _p.a) should be left as is. > Yes I just discovered that too. Fixed. >> # 20151115: Fox bad upgrade scheme >> OLD_FILES+=usr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030 >> OLD_FILES+=usr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312 > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r291594 - head
Author: bdrewery Date: Tue Dec 1 16:16:40 2015 New Revision: 291594 URL: https://svnweb.freebsd.org/changeset/base/291594 Log: Correct r291591: Don't remove /usr/lib/libelf*, these are still installed. Only the shared library moved to /lib. X-MFC-With: r291566 Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Tue Dec 1 16:08:38 2015(r291593) +++ head/ObsoleteFiles.inc Tue Dec 1 16:16:40 2015(r291594) @@ -40,9 +40,6 @@ # 20151130: libelf moved from /usr/lib to /lib (libkvm dependency in r291406) OLD_LIBS+=usr/lib/libelf.so.2 -OLD_FILES+=usr/lib/libelf.a -OLD_FILES+=usr/lib/libelf.so -OLD_FILES+=usr/lib/libelf_p.a # 20151115: Fox bad upgrade scheme OLD_FILES+=usr/share/locale/zh_CN.GB18030/zh_Hans_CN.GB18030 OLD_FILES+=usr/share/locale/zh_CN.GB2312/zh_Hans_CN.GB2312 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r291592 - head/usr.bin/netstat
Hi, > On Tue, 01 Dec 2015 08:13:41 -0800 > Ravi Pokala said: rpokala> The value returned by p_sockaddr("destination", ...) is saved to "protrusion", but it is never used before it is overwritten by the value returned by p_sockaddr("gateway", ...). That doesn't seem right. The protrusion is given to the argument of next p_sockaddr() call. Sincerely, -- Hajimu UMEMOTO u...@mahoroba.org u...@freebsd.org http://www.mahoroba.org/~ume/ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291595 - head/usr.bin/vmstat
Author: allanjude Date: Tue Dec 1 16:31:07 2015 New Revision: 291595 URL: https://svnweb.freebsd.org/changeset/base/291595 Log: Some problems were introduced during the libxo-ification of vmstat, fix them stop vmstat -i segfaulting remove duplicate header from vmstat -i do not pad the name of the interupt in encoded outputs fix stray % and missing } in the header for vmstat -i add outer container to vmstat -i add missing xo_flush in vmstat -i (when run with an interval or delay) add outer container to vmstat -m do not pad the name of malloc areans add outer container to vmstat -z do not pad the name of memory zones Reviewed by: rodrigc Approved by: bapt (mentor) Sponsored by: ScaleEngine Inc. Differential Revision:https://reviews.freebsd.org/D4263 Modified: head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/vmstat/vmstat.c == --- head/usr.bin/vmstat/vmstat.cTue Dec 1 16:16:40 2015 (r291594) +++ head/usr.bin/vmstat/vmstat.cTue Dec 1 16:31:07 2015 (r291595) @@ -1318,8 +1318,6 @@ print_intrcnts(unsigned long *intrcnts, inttotal = 0; old_inttotal = 0; intrname = intrnames; - xo_emit("{T:/%-*s} {T:/%20s} {T:/%10s}\n", - (int)istrnamlen, "interrupt", "total", "rate"); xo_open_list("interrupt"); for (i = 0, intrcnt=intrcnts, old_intrcnt=old_intrcnts; i < nintr; i++) { if (intrname[0] != '\0' && (*intrcnt != 0 || aflag)) { @@ -1328,8 +1326,10 @@ print_intrcnts(unsigned long *intrcnts, count = *intrcnt - *old_intrcnt; rate = (count * 1000 + period_ms / 2) / period_ms; xo_open_instance("interrupt"); - xo_emit("{k:name/%-*s} {:total/%20lu} {:rate/%10lu}\n", - (int)istrnamlen, intrname, count, rate); + xo_emit("{d:name/%-*s}{ket:name/%s} " + "{:total/%20lu} {:rate/%10lu}\n", + (int)istrnamlen, intrname, + intrname, count, rate); xo_close_instance("interrupt"); } intrname += strlen(intrname) + 1; @@ -1380,13 +1380,15 @@ dointr(unsigned int interval, int reps) istrnamlen = clen; intrname += strlen(intrname) + 1; } - xo_emit("%{T:/%-%s} {T:/%20s} {T:/%10s\n", + xo_emit("{T:/%-*s} {T:/%20s} {T:/%10s}\n", (int)istrnamlen, "interrupt", "total", "rate"); /* * Loop reps times printing differential interrupt counts. If reps is * zero, then run just once, printing total counts */ + xo_open_container("interrupt-statistics"); + period_ms = uptime / 100; while(1) { unsigned int nintr; @@ -1405,6 +1407,7 @@ dointr(unsigned int interval, int reps) print_intrcnts(intrcnts, old_intrcnts, intrnames, nintr, istrnamlen, period_ms); + xo_flush(); free(old_intrcnts); old_intrcnts = intrcnts; @@ -1415,6 +1418,8 @@ dointr(unsigned int interval, int reps) uptime = getuptime(); period_ms = (uptime - old_uptime) / 100; } + + xo_close_container("interrupt-statistics"); } static void @@ -1446,6 +1451,7 @@ domemstat_malloc(void) memstat_strerror(error)); } } + xo_open_container("malloc-statistics"); xo_emit("{T:/%13s} {T:/%5s} {T:/%6s} {T:/%7s} {T:/%8s} {T:Size(s)}\n", "Type", "InUse", "MemUse", "HighUse", "Requests"); xo_open_list("memory"); @@ -1455,7 +1461,7 @@ domemstat_malloc(void) memstat_get_count(mtp) == 0) continue; xo_open_instance("memory"); - xo_emit("{k:type/%13s} {:in-use/%5" PRIu64 "} " + xo_emit("{k:type/%13s/%s} {:in-use/%5" PRIu64 "} " "{:memory-use/%5" PRIu64 "}{U:K} {:high-use/%7s} " "{:requests/%8" PRIu64 "} ", memstat_get_name(mtp), memstat_get_count(mtp), @@ -1476,6 +1482,7 @@ domemstat_malloc(void) xo_emit("\n"); } xo_close_list("memory"); + xo_close_container("malloc-statistics"); memstat_mtl_free(mtlp); } @@ -1509,6 +1516,7 @@ domemstat_zone(void) memstat_strerror(error)); } } + xo_open_container("memory-zone-statistics"); xo_emit("{T:/%-20s} {T:/%6s} {T:/%6s} {T:/%8s} {T:/%8s} {T:/%8s} " "{T:/%4s} {T:/%4s}\n\n", "ITEM", "SIZE", "LIMIT", "USED", "FREE", "REQ", "FAIL", "SLEEP"); @@ -1518,10 +1526,11 @@ domemstat_zone
Re: svn commit: r291592 - head/usr.bin/netstat
-Original Message- From: Hajimu UMEMOTO Date: 2015-12-01, Tuesday at 08:26 To: Ravi Pokala Cc: , , Subject: Re: svn commit: r291592 - head/usr.bin/netstat >Hi, > >> On Tue, 01 Dec 2015 08:13:41 -0800 >> Ravi Pokala said: > >rpokala> The value returned by p_sockaddr("destination", ...) is saved to >"protrusion", but it is never used before it is overwritten by the value >returned by p_sockaddr("gateway", ...). That doesn't seem right. > >The protrusion is given to the argument of next p_sockaddr() call. How did I miss that? Looks like it's time for new glasses. :-/ -Ravi >Sincerely, > >-- >Hajimu UMEMOTO >u...@mahoroba.org u...@freebsd.org >http://www.mahoroba.org/~ume/ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291596 - head/etc/rc.d
Author: trasz Date: Tue Dec 1 16:42:39 2015 New Revision: 291596 URL: https://svnweb.freebsd.org/changeset/base/291596 Log: Modify the rctl rc script to add multiple rules in a single run. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/etc/rc.d/rctl Modified: head/etc/rc.d/rctl == --- head/etc/rc.d/rctl Tue Dec 1 16:31:07 2015(r291595) +++ head/etc/rc.d/rctl Tue Dec 1 16:42:39 2015(r291596) @@ -23,10 +23,10 @@ rctl_start() \#*|'') ;; *) - rctl -a "${var}" + echo "${var}" ;; esac - done < ${rctl_rules} + done < ${rctl_rules} | xargs rctl -a fi } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291597 - head/sys/kern
Author: nwhitehorn Date: Tue Dec 1 17:00:31 2015 New Revision: 291597 URL: https://svnweb.freebsd.org/changeset/base/291597 Log: Missed header_supported call from r291020: make really, really sure the brand likes the executable. Modified: head/sys/kern/imgact_elf.c Modified: head/sys/kern/imgact_elf.c == --- head/sys/kern/imgact_elf.c Tue Dec 1 16:42:39 2015(r291596) +++ head/sys/kern/imgact_elf.c Tue Dec 1 17:00:31 2015(r291597) @@ -273,6 +273,9 @@ __elfN(get_brandinfo)(struct image_param if (hdr->e_machine == bi->machine && (bi->flags & (BI_BRAND_NOTE|BI_BRAND_NOTE_MANDATORY)) != 0) { ret = __elfN(check_note)(imgp, bi->brand_note, osrel); + /* Give brand a chance to veto check_note's guess */ + if (ret && bi->header_supported) + ret = bi->header_supported(imgp); if (ret) return (bi); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291598 - in head/sys/boot: ofw/libofw powerpc/kboot powerpc/ps3
Author: nwhitehorn Date: Tue Dec 1 17:01:27 2015 New Revision: 291598 URL: https://svnweb.freebsd.org/changeset/base/291598 Log: Allow loader to load 64-bit ELFv2 PowerPC kernels. Modified: head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c head/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c head/sys/boot/powerpc/ps3/ppc64_elf_freebsd.c Modified: head/sys/boot/ofw/libofw/ppc64_elf_freebsd.c == --- head/sys/boot/ofw/libofw/ppc64_elf_freebsd.cTue Dec 1 17:00:31 2015(r291597) +++ head/sys/boot/ofw/libofw/ppc64_elf_freebsd.cTue Dec 1 17:01:27 2015(r291598) @@ -77,8 +77,11 @@ ppc64_ofw_elf_exec(struct preloaded_file } e = (Elf_Ehdr *)&fmp->md_data; - /* Handle function descriptor */ - entry = *(uint64_t *)e->e_entry; + /* Handle function descriptor for ELFv1 kernels */ + if ((e->e_flags & 3) == 2) + entry = e->e_entry; + else + entry = *(uint64_t *)e->e_entry; if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0) return (error); Modified: head/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c == --- head/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c Tue Dec 1 17:00:31 2015(r291597) +++ head/sys/boot/powerpc/kboot/ppc64_elf_freebsd.c Tue Dec 1 17:01:27 2015(r291598) @@ -78,10 +78,15 @@ ppc64_elf_exec(struct preloaded_file *fp /* Figure out where to put it */ trampolinebase = archsw.arch_loadaddr(LOAD_RAW, NULL, 0); - /* Set up interesting values in function descriptor */ + /* Set up loader trampoline */ trampoline = malloc(szkerneltramp); memcpy(trampoline, &kerneltramp, szkerneltramp); - archsw.arch_copyout(e->e_entry + elf64_relocation_offset, &entry, 8); + /* Parse function descriptor for ELFv1 kernels */ + if ((e->e_flags & 3) == 2) + entry = e->e_entry; + else + archsw.arch_copyout(e->e_entry + elf64_relocation_offset, + &entry, 8); trampoline[2] = entry + elf64_relocation_offset; trampoline[4] = 0; /* Phys. mem offset */ trampoline[5] = 0; /* OF entry point */ Modified: head/sys/boot/powerpc/ps3/ppc64_elf_freebsd.c == --- head/sys/boot/powerpc/ps3/ppc64_elf_freebsd.c Tue Dec 1 17:00:31 2015(r291597) +++ head/sys/boot/powerpc/ps3/ppc64_elf_freebsd.c Tue Dec 1 17:01:27 2015(r291598) @@ -75,8 +75,11 @@ ppc64_elf_exec(struct preloaded_file *fp } e = (Elf_Ehdr *)&fmp->md_data; - /* Handle function descriptor */ - entry = (void *)(uintptr_t)(*(uint64_t *)e->e_entry); + /* Handle function descriptor for ELFv1 kernels */ + if ((e->e_flags & 3) == 2) + entry = e->e_entry; + else + entry = (void *)(uintptr_t)(*(uint64_t *)e->e_entry); if ((error = md_load64(fp->f_args, &mdp)) != 0) return (error); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291599 - head/lib/lib80211
Author: bdrewery Date: Tue Dec 1 17:31:22 2015 New Revision: 291599 URL: https://svnweb.freebsd.org/changeset/base/291599 Log: No trailing slash is needed here. Modified: head/lib/lib80211/Makefile Modified: head/lib/lib80211/Makefile == --- head/lib/lib80211/Makefile Tue Dec 1 17:01:27 2015(r291598) +++ head/lib/lib80211/Makefile Tue Dec 1 17:31:22 2015(r291599) @@ -5,7 +5,7 @@ SHLIBDIR?= /lib SHLIB_MAJOR= 1 SRCS= lib80211_regdomain.c lib80211_ioctl.c -INCSDIR= ${INCLUDEDIR}/lib80211/ +INCSDIR= ${INCLUDEDIR}/lib80211 INCS= lib80211_regdomain.h lib80211_ioctl.h MAN= lib80211.3 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291600 - in head: lib/lib80211 share/mk
Author: bdrewery Date: Tue Dec 1 17:38:52 2015 New Revision: 291600 URL: https://svnweb.freebsd.org/changeset/base/291600 Log: Fix underlinking in lib80211 and define static dependencies in src.libnames.mk so NO_SHARED works properly. Reported by: Manfred Antar Sponsored by: EMC / Isilon Storage Division Modified: head/lib/lib80211/Makefile head/share/mk/src.libnames.mk Modified: head/lib/lib80211/Makefile == --- head/lib/lib80211/Makefile Tue Dec 1 17:31:22 2015(r291599) +++ head/lib/lib80211/Makefile Tue Dec 1 17:38:52 2015(r291600) @@ -8,6 +8,8 @@ SRCS= lib80211_regdomain.c lib80211_ioct INCSDIR= ${INCLUDEDIR}/lib80211 INCS= lib80211_regdomain.h lib80211_ioctl.h +LIBADD= sbuf bsdxml + MAN= lib80211.3 CFLAGS+=-I${.CURDIR} Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Tue Dec 1 17:31:22 2015 (r291599) +++ head/share/mk/src.libnames.mk Tue Dec 1 17:38:52 2015 (r291600) @@ -162,6 +162,7 @@ _LIBRARIES= \ ypclnt \ z +_DP_80211= sbuf bsdxml _DP_archive= z bz2 lzma bsdxml .if ${MK_OPENSSL} != "no" _DP_archive+= crypto ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r291600 - in head: lib/lib80211 share/mk
On 12/1/2015 9:38 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Dec 1 17:38:52 2015 > New Revision: 291600 > URL: https://svnweb.freebsd.org/changeset/base/291600 > > Log: > Fix underlinking in lib80211 and define static dependencies in > src.libnames.mk > so NO_SHARED works properly. > > Reported by:Manfred Antar > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/lib/lib80211/Makefile > head/share/mk/src.libnames.mk > > Modified: head/lib/lib80211/Makefile > == > --- head/lib/lib80211/MakefileTue Dec 1 17:31:22 2015 > (r291599) > +++ head/lib/lib80211/MakefileTue Dec 1 17:38:52 2015 > (r291600) > @@ -8,6 +8,8 @@ SRCS= lib80211_regdomain.c lib80211_ioct > INCSDIR= ${INCLUDEDIR}/lib80211 > INCS=lib80211_regdomain.h lib80211_ioctl.h > > +LIBADD= sbuf bsdxml > + I have a branch in progress to automatically detect underlinking like this. I did so at Isilon for internal libraries, but not FreeBSD libraries. Doing so for FreeBSD has become a massive effort just as it was for Isilon's internal libraries. There's a lot of cyclic dependencies and libraries missing from src.libnames.mk. > MAN= lib80211.3 > > CFLAGS+=-I${.CURDIR} > > Modified: head/share/mk/src.libnames.mk > == > --- head/share/mk/src.libnames.mk Tue Dec 1 17:31:22 2015 > (r291599) > +++ head/share/mk/src.libnames.mk Tue Dec 1 17:38:52 2015 > (r291600) > @@ -162,6 +162,7 @@ _LIBRARIES= \ > ypclnt \ > z > > +_DP_80211= sbuf bsdxml I am adding a sanity check in src.libnames.mk for this to assert that the _DP_{lib} matches the lib's LIBADD. I consider the _DP_{lib} entries to be a bad hack but it's what we're stuck with for now until something better comes along. > _DP_archive= z bz2 lzma bsdxml > .if ${MK_OPENSSL} != "no" > _DP_archive+=crypto > -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
Re: svn commit: r291600 - in head: lib/lib80211 share/mk
oh, thanks! -a On 1 December 2015 at 09:49, Bryan Drewery wrote: > On 12/1/2015 9:38 AM, Bryan Drewery wrote: >> Author: bdrewery >> Date: Tue Dec 1 17:38:52 2015 >> New Revision: 291600 >> URL: https://svnweb.freebsd.org/changeset/base/291600 >> >> Log: >> Fix underlinking in lib80211 and define static dependencies in >> src.libnames.mk >> so NO_SHARED works properly. >> >> Reported by:Manfred Antar >> Sponsored by: EMC / Isilon Storage Division >> >> Modified: >> head/lib/lib80211/Makefile >> head/share/mk/src.libnames.mk >> >> Modified: head/lib/lib80211/Makefile >> == >> --- head/lib/lib80211/MakefileTue Dec 1 17:31:22 2015 >> (r291599) >> +++ head/lib/lib80211/MakefileTue Dec 1 17:38:52 2015 >> (r291600) >> @@ -8,6 +8,8 @@ SRCS= lib80211_regdomain.c lib80211_ioct >> INCSDIR= ${INCLUDEDIR}/lib80211 >> INCS=lib80211_regdomain.h lib80211_ioctl.h >> >> +LIBADD= sbuf bsdxml >> + > > I have a branch in progress to automatically detect underlinking like > this. I did so at Isilon for internal libraries, but not FreeBSD > libraries. Doing so for FreeBSD has become a massive effort just as it > was for Isilon's internal libraries. There's a lot of cyclic > dependencies and libraries missing from src.libnames.mk. > >> MAN= lib80211.3 >> >> CFLAGS+=-I${.CURDIR} >> >> Modified: head/share/mk/src.libnames.mk >> == >> --- head/share/mk/src.libnames.mk Tue Dec 1 17:31:22 2015 >> (r291599) >> +++ head/share/mk/src.libnames.mk Tue Dec 1 17:38:52 2015 >> (r291600) >> @@ -162,6 +162,7 @@ _LIBRARIES= \ >> ypclnt \ >> z >> >> +_DP_80211= sbuf bsdxml > > I am adding a sanity check in src.libnames.mk for this to assert that > the _DP_{lib} matches the lib's LIBADD. > > I consider the _DP_{lib} entries to be a bad hack but it's what we're > stuck with for now until something better comes along. > >> _DP_archive= z bz2 lzma bsdxml >> .if ${MK_OPENSSL} != "no" >> _DP_archive+=crypto >> > > > -- > Regards, > Bryan Drewery > ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291601 - head/share/mk
Author: bdrewery Date: Tue Dec 1 18:09:40 2015 New Revision: 291601 URL: https://svnweb.freebsd.org/changeset/base/291601 Log: Add missing LIB80211 entry for DPADD needs. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk == --- head/share/mk/bsd.libnames.mk Tue Dec 1 17:38:52 2015 (r291600) +++ head/share/mk/bsd.libnames.mk Tue Dec 1 18:09:40 2015 (r291601) @@ -14,6 +14,7 @@ LIBCRT0?= ${DESTDIR}${LIBDIR}/crt0.o +LIB80211?= ${DESTDIR}${LIBDIR}/lib80211.a LIBALIAS?= ${DESTDIR}${LIBDIR}/libalias.a LIBARCHIVE?= ${DESTDIR}${LIBDIR}/libarchive.a LIBASN1?= ${DESTDIR}${LIBDIR}/libasn1.a ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r291601 - head/share/mk
On 12/1/2015 10:09 AM, Bryan Drewery wrote: > Author: bdrewery > Date: Tue Dec 1 18:09:40 2015 > New Revision: 291601 > URL: https://svnweb.freebsd.org/changeset/base/291601 > > Log: > Add missing LIB80211 entry for DPADD needs. > > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/share/mk/bsd.libnames.mk > > Modified: head/share/mk/bsd.libnames.mk > == > --- head/share/mk/bsd.libnames.mk Tue Dec 1 17:38:52 2015 > (r291600) > +++ head/share/mk/bsd.libnames.mk Tue Dec 1 18:09:40 2015 > (r291601) > @@ -14,6 +14,7 @@ > > LIBCRT0?=${DESTDIR}${LIBDIR}/crt0.o > > +LIB80211?= ${DESTDIR}${LIBDIR}/lib80211.a > LIBALIAS?= ${DESTDIR}${LIBDIR}/libalias.a > LIBARCHIVE?= ${DESTDIR}${LIBDIR}/libarchive.a > LIBASN1?=${DESTDIR}${LIBDIR}/libasn1.a > I have a sanity check coming for this too. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r291605 - head
Author: bdrewery Date: Tue Dec 1 19:00:43 2015 New Revision: 291605 URL: https://svnweb.freebsd.org/changeset/base/291605 Log: Fix errors being ignored in many phases of the build since the bmake integration. Say it with me, "I will not chain commands with && in Makefiles" This was originally fixed and explained quite well by bde@ in r36074. The initial bmake integration caused 'set -e' to stop being used which lead to r252419. Later 'set -e' expectations were fixed with bmake in r254980. Because of the && here, errors would be ignored when building in parallel and a dependency failed. Such as bootstrap-tools since it builds everything in parallel. If any tool failed in obj/depend/all, it would just ignore the error and continue to build. This later would result in cascaded errors that only confused the real issue. This could also cause commands after the failed command to still execute, leading to more confusion. This should be fine if the command is in a sub-shell such as: (cmd1 && cmd2) This reverts r252419. MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile head/Makefile.inc1 head/UPDATING Modified: head/Makefile == --- head/Makefile Tue Dec 1 18:27:38 2015(r291604) +++ head/Makefile Tue Dec 1 19:00:43 2015(r291605) @@ -323,21 +323,21 @@ bmake: .PHONY @echo ">>> Building an up-to-date ${.TARGET}(1)" @echo "--" ${_+_}@cd ${.CURDIR}/usr.bin/${.TARGET}; \ - ${MMAKE} obj && \ - ${MMAKE} depend && \ - ${MMAKE} all && \ + ${MMAKE} obj; \ + ${MMAKE} depend; \ + ${MMAKE} all; \ ${MMAKE} install DESTDIR=${MYMAKE:H} BINDIR= tinderbox toolchains kernel-toolchains: upgrade_checks tinderbox: - @cd ${.CURDIR} && ${SUB_MAKE} DOING_TINDERBOX=YES universe + @cd ${.CURDIR}; ${SUB_MAKE} DOING_TINDERBOX=YES universe toolchains: - @cd ${.CURDIR} && ${SUB_MAKE} UNIVERSE_TARGET=toolchain universe + @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=toolchain universe kernel-toolchains: - @cd ${.CURDIR} && ${SUB_MAKE} UNIVERSE_TARGET=kernel-toolchain universe + @cd ${.CURDIR}; ${SUB_MAKE} UNIVERSE_TARGET=kernel-toolchain universe # # universe @@ -435,7 +435,7 @@ universe_${target}_kernels: universe_${t (echo "${target} 'make LINT' failed," \ "check _.${target}.makeLINT for details"| ${MAKEFAIL})) .endif - @cd ${.CURDIR} && ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \ + @cd ${.CURDIR}; ${SUB_MAKE} ${.MAKEFLAGS} TARGET=${target} \ universe_kernels .endif # !MAKE_JUST_WORLDS Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Dec 1 18:27:38 2015(r291604) +++ head/Makefile.inc1 Tue Dec 1 19:00:43 2015(r291605) @@ -1283,7 +1283,7 @@ doxygen: .PHONY echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ exit 1; \ fi - ${_+_}cd ${.CURDIR}/tools/kerneldoc/subsys && ${MAKE} obj all + ${_+_}cd ${.CURDIR}/tools/kerneldoc/subsys; ${MAKE} obj all # # update @@ -1303,7 +1303,7 @@ update: @echo "--" @echo ">>> Updating ${.CURDIR} using Subversion" @echo "--" - @(cd ${.CURDIR} && ${SVN} update ${SVNFLAGS}) + @(cd ${.CURDIR}; ${SVN} update ${SVNFLAGS}) .endif # @@ -1336,11 +1336,11 @@ legacy: .endif .for _tool in tools/build ${_elftoolchain_libs} ${_+_}@${ECHODIR} "===> ${_tool} (obj,includes,depend,all,install)"; \ - cd ${.CURDIR}/${_tool} && \ - ${MAKE} DIRPRFX=${_tool}/ obj && \ - ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes && \ - ${MAKE} DIRPRFX=${_tool}/ depend && \ - ${MAKE} DIRPRFX=${_tool}/ all && \ + cd ${.CURDIR}/${_tool}; \ + ${MAKE} DIRPRFX=${_tool}/ obj; \ + ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy includes; \ + ${MAKE} DIRPRFX=${_tool}/ depend; \ + ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install .endfor @@ -1489,10 +1489,10 @@ bootstrap-tools: .PHONY usr.bin/localedef ${_bt}-${_tool}: .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ - cd ${.CURDIR}/${_tool} && \ - ${MAKE} DIRPRFX=${_tool}/ obj && \ - ${MAKE} DIRPRFX=${_tool}/ depend && \ - ${MAKE} DIRPRFX=${_tool}/
svn commit: r291607 - in head: bin/df bin/ls bin/ps sbin/savecore usr.bin/iscsictl usr.bin/netstat usr.bin/w usr.bin/wc
Author: rodrigc Date: Tue Dec 1 19:18:53 2015 New Revision: 291607 URL: https://svnweb.freebsd.org/changeset/base/291607 Log: Add more text to explain --libxo flag. Modified: head/bin/df/df.1 head/bin/ls/ls.1 head/bin/ps/ps.1 head/sbin/savecore/savecore.8 head/usr.bin/iscsictl/iscsictl.8 head/usr.bin/netstat/netstat.1 head/usr.bin/w/w.1 head/usr.bin/wc/wc.1 Modified: head/bin/df/df.1 == --- head/bin/df/df.1Tue Dec 1 19:17:30 2015(r291606) +++ head/bin/df/df.1Tue Dec 1 19:18:53 2015(r291607) @@ -29,7 +29,7 @@ .\" @(#)df.1 8.3 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd November 6, 2014 +.Dd December 1, 2015 .Dt DF 1 .Os .Sh NAME @@ -62,6 +62,13 @@ option below). .Pp The following options are available: .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl a Show all mount points, including those that were mounted with the .Dv MNT_IGNORE Modified: head/bin/ls/ls.1 == --- head/bin/ls/ls.1Tue Dec 1 19:17:30 2015(r291606) +++ head/bin/ls/ls.1Tue Dec 1 19:18:53 2015(r291607) @@ -32,7 +32,7 @@ .\" @(#)ls.1 8.7 (Berkeley) 7/29/94 .\" $FreeBSD$ .\" -.Dd September 27, 2015 +.Dd December 1, 2015 .Dt LS 1 .Os .Sh NAME @@ -69,6 +69,13 @@ lexicographical order. .Pp The following options are available: .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl A Include directory entries whose names begin with a dot Modified: head/bin/ps/ps.1 == --- head/bin/ps/ps.1Tue Dec 1 19:17:30 2015(r291606) +++ head/bin/ps/ps.1Tue Dec 1 19:18:53 2015(r291607) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd May 27, 2015 +.Dd December 1, 2015 .Dt PS 1 .Os .Sh NAME @@ -103,6 +103,13 @@ and associated command. .Pp The options are as follows: .Bl -tag -width indent +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl a Display information about other users' processes as well as your own. If the Modified: head/sbin/savecore/savecore.8 == --- head/sbin/savecore/savecore.8 Tue Dec 1 19:17:30 2015 (r291606) +++ head/sbin/savecore/savecore.8 Tue Dec 1 19:18:53 2015 (r291607) @@ -28,7 +28,7 @@ .\" From: @(#)savecore.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd December 17, 2012 +.Dd December 1, 2015 .Dt SAVECORE 8 .Os .Sh NAME @@ -44,6 +44,7 @@ .Op Fl v .Op Ar device ... .Nm +.Op Fl -libxo .Op Fl fkvz .Op Fl m Ar maxdumps .Op Ar directory Op Ar device ... @@ -61,6 +62,13 @@ the system log. .Pp The options are as follows: .Bl -tag -width ".Fl m Ar maxdumps" +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl C Check to see if a dump exists, and display a brief message to indicate the status. @@ -154,6 +162,8 @@ is meant to be called near the end of th .Sh SEE ALSO .Xr gzip 1 , .Xr getbootfile 3 , +.Xr libxo 3 , +.Xr xo_parse_args 3 , .Xr textdump 4 , .Xr tar 5 , .Xr dumpon 8 , Modified: head/usr.bin/iscsictl/iscsictl.8 == --- head/usr.bin/iscsictl/iscsictl.8Tue Dec 1 19:17:30 2015 (r291606) +++ head/usr.bin/iscsictl/iscsictl.8Tue Dec 1 19:18:53 2015 (r291607) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 17, 2015 +.Dd December 1, 2015 .Dt ISCSICTL 8 .Os .Sh NAME @@ -80,6 +80,13 @@ utility is used to configure the iSCSI i .Pp The following options are available: .Bl -tag -width ".Fl A" +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. .It Fl A Add session. .It Fl M @@ -182,7 +189,9 @@ Disconnect all iSCSI sessions: .Sh SEE ALSO .Xr iscsi 4 , .Xr iscsi.conf 5 , -.Xr iscsid 8 +.Xr iscsid 8 , +.Xr libxo 3 , +.Xr xo_parse_args 3 .Sh HISTORY The .Nm Modified: head/usr.bin/netstat/netstat.1 == --- head/usr.bin/netstat/netstat.1 Tue Dec 1 19:17:30 2015 (r291606) +++ head/usr.bin/netstat/netsta
svn commit: r291608 - head/bin/ps
Author: rodrigc Date: Tue Dec 1 19:20:38 2015 New Revision: 291608 URL: https://svnweb.freebsd.org/changeset/base/291608 Log: Fix spelling, as recommended by igor tool. Modified: head/bin/ps/ps.1 Modified: head/bin/ps/ps.1 == --- head/bin/ps/ps.1Tue Dec 1 19:18:53 2015(r291607) +++ head/bin/ps/ps.1Tue Dec 1 19:20:38 2015(r291608) @@ -142,7 +142,7 @@ column is not the last column displayed. .It Fl e Display the environment as well. .It Fl f -Show commandline and environment information about swapped out processes. +Show command-line and environment information about swapped out processes. This option is honored only if the UID of the user is 0. .It Fl G Display information about processes which are running with the specified ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291609 - head/usr.bin/rctl
Author: ngie Date: Tue Dec 1 19:37:24 2015 New Revision: 291609 URL: https://svnweb.freebsd.org/changeset/base/291609 Log: Fix typos in error messages dealing with unknown groups/users MFC after: 1 month X-MFC with: r291447, r291452 Sponsored by: EMC / Isilon Storage Division Modified: head/usr.bin/rctl/rctl.c Modified: head/usr.bin/rctl/rctl.c == --- head/usr.bin/rctl/rctl.cTue Dec 1 19:20:38 2015(r291608) +++ head/usr.bin/rctl/rctl.cTue Dec 1 19:37:24 2015(r291609) @@ -64,7 +64,7 @@ parse_user(const char *s, id_t *uidp, co } if (!isnumber(s[0])) { - warnx("malformed rule '%s': uknown user '%s'", + warnx("malformed rule '%s': unknown user '%s'", unexpanded_rule, s); return (1); } @@ -92,7 +92,7 @@ parse_group(const char *s, id_t *gidp, c } if (!isnumber(s[0])) { - warnx("malformed rule '%s': uknown group '%s'", + warnx("malformed rule '%s': unknown group '%s'", unexpanded_rule, s); return (1); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291610 - head
Author: bdrewery Date: Tue Dec 1 19:58:08 2015 New Revision: 291610 URL: https://svnweb.freebsd.org/changeset/base/291610 Log: Allow storing package(world|kernel) tarballs into a different location at PACKAGEDIR. Submitted by: Russell Cattelan Discussed with: gjb MFC after:2 weeks Obtained from:OneFS Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Dec 1 19:37:24 2015(r291609) +++ head/Makefile.inc1 Tue Dec 1 19:58:08 2015(r291610) @@ -144,6 +144,7 @@ CLEANDIR= cleandir .endif LOCAL_TOOL_DIRS?= +PACKAGEDIR?= ${DESTDIR}/${DISTDIR} BUILDENV_SHELL?=${SHELL} @@ -1008,11 +1009,11 @@ packageworld: ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ tar cvf - --exclude usr/lib/debug \ @${DESTDIR}/${DISTDIR}/${dist}.meta | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}.txz + ${XZ_CMD} > ${PACKAGEDIR}/${dist}.txz .else ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ tar cvf - --exclude usr/lib/debug . | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}.txz + ${XZ_CMD} > ${PACKAGEDIR}/${dist}.txz .endif .endfor @@ -1020,11 +1021,11 @@ packageworld: . if defined(NO_ROOT) ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ tar cvf - @${DESTDIR}/${DISTDIR}/${dist}.debug.meta | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz + ${XZ_CMD} > ${PACKAGEDIR}/${dist}-dbg.txz . else ${_+_}cd ${DESTDIR}/${DISTDIR}/${dist}; \ tar cvLf - usr/lib/debug | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/${dist}-dbg.txz + ${XZ_CMD} > ${PACKAGEDIR}/${dist}-dbg.txz . endif .endfor @@ -1252,23 +1253,23 @@ packagekernel: .if defined(NO_ROOT) cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz + ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz .if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - @${DESTDIR}/${DISTDIR}/kernel.${_kernel}.meta | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz + ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz .endfor .endif .else cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - . | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.txz + ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz .if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ tar cvf - . | \ - ${XZ_CMD} > ${DESTDIR}/${DISTDIR}/kernel.${_kernel}.txz + ${XZ_CMD} > ${PACKAGEDIR}/kernel.${_kernel}.txz .endfor .endif .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291611 - head
Author: bdrewery Date: Tue Dec 1 20:24:58 2015 New Revision: 291611 URL: https://svnweb.freebsd.org/changeset/base/291611 Log: Add NO_INSTALLKERNEL to undo the assumption that the first KERNCONF will be installed as "kernel". This is relevant for packaging of the kernel when not wanting a default "kernel.txz". Submitted by: Russell Cattelan MFC after:2 weeks Obtained from:OneFS Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Tue Dec 1 19:58:08 2015(r291610) +++ head/Makefile.inc1 Tue Dec 1 20:24:58 2015(r291611) @@ -1110,10 +1110,14 @@ KERNCONFDIR?= ${KRNLCONFDIR} BUILDKERNELS= INSTALLKERNEL= +.if defined(NO_INSTALLKERNEL) +# All of the BUILDKERNELS loops start at index 1. +BUILDKERNELS+= dummy +.endif .for _kernel in ${KERNCONF} .if exists(${KERNCONFDIR}/${_kernel}) BUILDKERNELS+= ${_kernel} -.if empty(INSTALLKERNEL) +.if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) INSTALLKERNEL= ${_kernel} .endif .endif @@ -1127,12 +1131,12 @@ ${WMAKE_TGTS:N_worldtmp:Nbuild32} ${.ALL # Builds all kernels defined by BUILDKERNELS. # buildkernel: .MAKE .PHONY -.if empty(BUILDKERNELS) +.if empty(BUILDKERNELS:Ndummy) @echo "ERROR: Missing kernel configuration file(s) (${KERNCONF})."; \ false .endif @echo -.for _kernel in ${BUILDKERNELS} +.for _kernel in ${BUILDKERNELS:Ndummy} @echo "--" @echo ">>> Kernel build for ${_kernel} started on `LC_ALL=C date`" @echo "--" @@ -1191,6 +1195,7 @@ buildkernel: .MAKE .PHONY # installkernel installkernel.debug \ reinstallkernel reinstallkernel.debug: _installcheck_kernel +.if !defined(NO_INSTALLKERNEL) .if empty(INSTALLKERNEL) @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \ false @@ -1201,6 +1206,7 @@ reinstallkernel reinstallkernel.debug: _ cd ${KRNLOBJDIR}/${INSTALLKERNEL}; \ ${CROSSENV} PATH=${TMPPATH} \ ${MAKE} ${IMAKE_INSTALL} KERNEL=${INSTKERNNAME} ${.TARGET:S/kernel//} +.endif .if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} @echo "--" @@ -1213,6 +1219,7 @@ reinstallkernel reinstallkernel.debug: _ .endif distributekernel distributekernel.debug: +.if !defined(NO_INSTALLKERNEL) .if empty(INSTALLKERNEL) @echo "ERROR: No kernel \"${KERNCONF}\" to install."; \ false @@ -1230,6 +1237,7 @@ distributekernel distributekernel.debug: sed -e 's|^./kernel|.|' ${DESTDIR}/${DISTDIR}/kernel.premeta > \ ${DESTDIR}/${DISTDIR}/kernel.meta .endif +.endif .if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} .if defined(NO_ROOT) @@ -1251,9 +1259,11 @@ distributekernel distributekernel.debug: packagekernel: .if defined(NO_ROOT) +.if !defined(NO_INSTALLKERNEL) cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - @${DESTDIR}/${DISTDIR}/kernel.meta | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz +.endif .if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ @@ -1262,9 +1272,11 @@ packagekernel: .endfor .endif .else +.if !defined(NO_INSTALLKERNEL) cd ${DESTDIR}/${DISTDIR}/kernel; \ tar cvf - . | \ ${XZ_CMD} > ${PACKAGEDIR}/kernel.txz +.endif .if ${BUILDKERNELS:[#]} > 1 .for _kernel in ${BUILDKERNELS:[2..-1]} cd ${DESTDIR}/${DISTDIR}/kernel.${_kernel}; \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291612 - head/share/mk
Author: bdrewery Date: Tue Dec 1 20:50:14 2015 New Revision: 291612 URL: https://svnweb.freebsd.org/changeset/base/291612 Log: Support LOCAL_LIBRARIES for LIBADD. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Tue Dec 1 20:24:58 2015 (r291611) +++ head/share/mk/src.libnames.mk Tue Dec 1 20:50:14 2015 (r291612) @@ -50,6 +50,7 @@ _INTERNALLIBS=\ _LIBRARIES=\ ${_PRIVATELIBS} \ ${_INTERNALLIBS} \ + ${LOCAL_LIBRARIES} \ 80211 \ alias \ archive \ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291613 - head/share/mk
Author: bdrewery Date: Tue Dec 1 20:56:16 2015 New Revision: 291613 URL: https://svnweb.freebsd.org/changeset/base/291613 Log: Only include src.conf if _WITHOUT_SRCCONF not defined. This does not really fix anything currently since _WITHOUT_SRCCONF must be defined in the environment or local.sys.*.mk, but is proper and needed for downstream fixes. I am working towards reworking src.conf inclusion still. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.sys.mk Modified: head/share/mk/src.sys.mk == --- head/share/mk/src.sys.mkTue Dec 1 20:50:14 2015(r291612) +++ head/share/mk/src.sys.mkTue Dec 1 20:56:16 2015(r291613) @@ -5,6 +5,7 @@ # to preserve historical (and useful) behavior. Changes here need to # be reflected there so SRCCONF isn't included multiple times. +.if !defined(_WITHOUT_SRCCONF) # Allow user to configure things that only effect src tree builds. SRCCONF?= /etc/src.conf .if (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && !target(_srcconf_included_) @@ -29,6 +30,7 @@ __postrcconf_${var}:= ${MK_${var}:U-}${W .endfor .endif # SRCCONF +.endif # tempting, but bsd.compiler.mk causes problems this early # probably need to remove dependence on bsd.own.mk ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291614 - head/sys/conf
Author: jhb Date: Tue Dec 1 21:19:16 2015 New Revision: 291614 URL: https://svnweb.freebsd.org/changeset/base/291614 Log: Restore cleaning of auto-generated kobj files after the recent MFILES changes. Use the list of MFILES found by find to identify the set of possible auto-generated files and add the intersection of this set and SRCS to CLEANFILES. Submitted by: imp (previous version), sbruno Differential Revision:https://reviews.freebsd.org/D4336 Modified: head/sys/conf/kern.pre.mk head/sys/conf/kmod.mk Modified: head/sys/conf/kern.pre.mk == --- head/sys/conf/kern.pre.mk Tue Dec 1 20:56:16 2015(r291613) +++ head/sys/conf/kern.pre.mk Tue Dec 1 21:19:16 2015(r291614) @@ -206,9 +206,8 @@ SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symb SYSTEM_DEP+= ${LDSCRIPT} # Calculate path for .m files early, if needed. -.if !defined(_MPATH) +.if !defined(__MPATH) __MPATH!=find ${S:tA}/ -name \*_if.m -_MPATH=${__MPATH:H:O:u} .endif # MKMODULESENV is set here so that port makefiles can augment @@ -227,7 +226,7 @@ MKMODULESENV+= MODULES_OVERRIDE="${MODUL .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif -MKMODULESENV+= _MPATH="${_MPATH}" +MKMODULESENV+= __MPATH="${__MPATH}" # Architecture and output format arguments for objdump to convert image to # object file Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Tue Dec 1 20:56:16 2015(r291613) +++ head/sys/conf/kmod.mk Tue Dec 1 21:19:16 2015(r291614) @@ -370,14 +370,18 @@ vnode_if_typedef.h: .endif # Build _if.[ch] from _if.m, and clean them when we're done. -.if !defined(_MPATH) +.if !defined(__MPATH) __MPATH!=find ${SYSDIR:tA}/ -name \*_if.m -_MPATH=${__MPATH:H:O:u} .endif +_MFILES=${__MPATH:T:O} +_MPATH=${__MPATH:H:O:u} .PATH.m: ${_MPATH} .for _i in ${SRCS:M*_if.[ch]} -#removes too much, comment out until it's more constrained. -#CLEANFILES+= ${_i} +_MATCH=M${_i:R:S/$/.m/} +_MATCHES=${_MFILES:${_MATCH}} +.if !empty(_MATCHES) +CLEANFILES+= ${_i} +.endif .endfor # _i .m.c: ${SYSDIR}/tools/makeobjops.awk ${AWK} -f ${SYSDIR}/tools/makeobjops.awk ${.IMPSRC} -c ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291615 - head/contrib/netbsd-tests/lib/libcrypt
Author: rodrigc Date: Tue Dec 1 21:22:29 2015 New Revision: 291615 URL: https://svnweb.freebsd.org/changeset/base/291615 Log: Hack test so that it works on FreeBSD. Modified: head/contrib/netbsd-tests/lib/libcrypt/t_crypt.c Modified: head/contrib/netbsd-tests/lib/libcrypt/t_crypt.c == --- head/contrib/netbsd-tests/lib/libcrypt/t_crypt.cTue Dec 1 21:19:16 2015(r291614) +++ head/contrib/netbsd-tests/lib/libcrypt/t_crypt.cTue Dec 1 21:22:29 2015(r291615) @@ -124,11 +124,13 @@ ATF_TC_HEAD(crypt_salts, tc) ATF_TC_BODY(crypt_salts, tc) { for (size_t i = 0; tests[i].hash; i++) { + char *hash = crypt(tests[i].pw, tests[i].hash); #if defined(__FreeBSD__) - if (22 <= i) + if (i >= 22 && i != 24 && i != 25) atf_tc_expect_fail("Old-style/bad inputs fail on FreeBSD"); + else + atf_tc_expect_pass(); #endif - char *hash = crypt(tests[i].pw, tests[i].hash); if (!hash) { ATF_CHECK_MSG(0, "Test %zu NULL\n", i); continue; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291616 - head/lib/libcrypt/tests
Author: rodrigc Date: Tue Dec 1 21:25:18 2015 New Revision: 291616 URL: https://svnweb.freebsd.org/changeset/base/291616 Log: Enable libcrypt tests. kyua 0.12 has fix for https://github.com/jmmv/kyua/pull/148 which eliminates invalid XML characters from being written to test reports with "kyua report-junit". Modified: head/lib/libcrypt/tests/Makefile Modified: head/lib/libcrypt/tests/Makefile == --- head/lib/libcrypt/tests/MakefileTue Dec 1 21:22:29 2015 (r291615) +++ head/lib/libcrypt/tests/MakefileTue Dec 1 21:25:18 2015 (r291616) @@ -1,12 +1,12 @@ # $FreeBSD$ -#ATF_TESTS_C+= crypt_tests -# -#NETBSD_ATF_TESTS_C+= crypt_test -# -#CFLAGS+= -I${.CURDIR:H} -#LIBADD= crypt -# +ATF_TESTS_C+= crypt_tests + +NETBSD_ATF_TESTS_C+= crypt_test + +CFLAGS+= -I${.CURDIR:H} +LIBADD=crypt + .include .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291617 - head/lib/libauditd
Author: bdrewery Date: Tue Dec 1 22:03:40 2015 New Revision: 291617 URL: https://svnweb.freebsd.org/changeset/base/291617 Log: Don't override LIB*DIR variables from src.libnames.mk. MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libauditd/Makefile Modified: head/lib/libauditd/Makefile == --- head/lib/libauditd/Makefile Tue Dec 1 21:25:18 2015(r291616) +++ head/lib/libauditd/Makefile Tue Dec 1 22:03:40 2015(r291617) @@ -3,19 +3,19 @@ # OPENBSMDIR=${.CURDIR}/../../contrib/openbsm -LIBAUDITDDIR= ${OPENBSMDIR}/libauditd -LIBBSMDIR= ${OPENBSMDIR}/libbsm +_LIBAUDITDDIR= ${OPENBSMDIR}/libauditd +_LIBBSMDIR=${OPENBSMDIR}/libbsm LIB= auditd -.PATH: ${LIBAUDITDDIR} +.PATH: ${_LIBAUDITDDIR} SRCS= auditd_lib.c # # Must use BSM include files from within the contrib area, not the system. # -CFLAGS+= -I${OPENBSMDIR} -I${LIBBSMDIR} +CFLAGS+= -I${OPENBSMDIR} -I${_LIBBSMDIR} WARNS?=3 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291618 - head/lib/libarchive
Author: bdrewery Date: Tue Dec 1 22:04:59 2015 New Revision: 291618 URL: https://svnweb.freebsd.org/changeset/base/291618 Log: Don't override LIB*DIR variables from src.libnames.mk. MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/lib/libarchive/Makefile Modified: head/lib/libarchive/Makefile == --- head/lib/libarchive/MakefileTue Dec 1 22:03:40 2015 (r291617) +++ head/lib/libarchive/MakefileTue Dec 1 22:04:59 2015 (r291618) @@ -1,7 +1,7 @@ # $FreeBSD$ .include -LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive +_LIBARCHIVEDIR=${.CURDIR}/../../contrib/libarchive LIB= archive @@ -37,7 +37,7 @@ CFLAGS+= -DPPMD_32BIT .endif NO_WCAST_ALIGN.clang= -.PATH: ${LIBARCHIVEDIR}/libarchive +.PATH: ${_LIBARCHIVEDIR}/libarchive # Headers to be installed in /usr/include INCS= archive.h archive_entry.h ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291619 - head/share/mk
Author: bdrewery Date: Tue Dec 1 22:19:17 2015 New Revision: 291619 URL: https://svnweb.freebsd.org/changeset/base/291619 Log: Define a LIB*SRCDIR for all known _LIBRARIES. This is a follow-up to r291327 which added a LIB*DIR for all known _LIBRARIES. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk == --- head/share/mk/bsd.libnames.mk Tue Dec 1 22:04:59 2015 (r291618) +++ head/share/mk/bsd.libnames.mk Tue Dec 1 22:19:17 2015 (r291619) @@ -152,3 +152,11 @@ LDADD:=${LDADD:N-lpthread} -lpthread LDADD:=${LDADD:N-lc} -lc .endif .endif + +# Only do this for src builds. +.if defined(SRCTOP) +# Derive LIB*SRCDIR from LIB*DIR +.for lib in ${_LIBRARIES} +LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} +.endfor +.endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291620 - in head: gnu/usr.bin/dtc lib/libarchive/tests lib/libbsm lib/libc++ lib/msun libexec/rtld-elf usr.bin/cpio usr.bin/cpio/tests usr.bin/tar usr.bin/tar/tests
Author: bdrewery Date: Tue Dec 1 22:20:04 2015 New Revision: 291620 URL: https://svnweb.freebsd.org/changeset/base/291620 Log: Don't override LIB*DIR variables from src.libnames.mk. In some cases switch to the LIB*SRCDIR value. These recently were defined in r291327 and r291619. Sponsored by: EMC / Isilon Storage Division Modified: head/gnu/usr.bin/dtc/Makefile head/lib/libarchive/tests/Makefile head/lib/libbsm/Makefile head/lib/libc++/Makefile head/lib/msun/Makefile head/libexec/rtld-elf/Makefile head/usr.bin/cpio/Makefile head/usr.bin/cpio/tests/Makefile head/usr.bin/tar/Makefile head/usr.bin/tar/tests/Makefile Modified: head/gnu/usr.bin/dtc/Makefile == --- head/gnu/usr.bin/dtc/Makefile Tue Dec 1 22:19:17 2015 (r291619) +++ head/gnu/usr.bin/dtc/Makefile Tue Dec 1 22:20:04 2015 (r291620) @@ -3,8 +3,8 @@ .include DTCDIR=${.CURDIR}/../../../contrib/dtc -LIBFDTDIR= ${.CURDIR}/../../../sys/contrib/libfdt -.PATH: ${DTCDIR} ${LIBFDTDIR} +_LIBFDTDIR= ${.CURDIR}/../../../sys/contrib/libfdt +.PATH: ${DTCDIR} ${_LIBFDTDIR} PROG= dtc @@ -14,7 +14,7 @@ SRCS= dtc.c checks.c fstree.c livetree.c fdt_sw.c fdt_wip.c ${DTCVERSIONFILE} WARNS?=2 -CFLAGS+= -I. -I${.CURDIR} -I${DTCDIR} -I${LIBFDTDIR} +CFLAGS+= -I. -I${.CURDIR} -I${DTCDIR} -I${_LIBFDTDIR} VERSIONMAJ!= awk '/^VERSION =/ { print $$3 }' ${DTCDIR}/Makefile VERSIONMIN!= awk '/^PATCHLEVEL =/ { print $$3 }' ${DTCDIR}/Makefile Modified: head/lib/libarchive/tests/Makefile == --- head/lib/libarchive/tests/Makefile Tue Dec 1 22:19:17 2015 (r291619) +++ head/lib/libarchive/tests/Makefile Tue Dec 1 22:20:04 2015 (r291620) @@ -1,6 +1,6 @@ # $FreeBSD$ -LIBARCHIVEDIR= ${SRCTOP}/contrib/libarchive +_LIBARCHIVEDIR=${SRCTOP}/contrib/libarchive ATF_TESTS_SH+= functional_test @@ -9,14 +9,14 @@ BINDIR= ${TESTSDIR} PROGS+=libarchive_test CFLAGS+= -I${.CURDIR:H} -I${.OBJDIR} -CFLAGS+= -I${LIBARCHIVEDIR}/libarchive -I${LIBARCHIVEDIR}/test_utils +CFLAGS+= -I${_LIBARCHIVEDIR}/libarchive -I${_LIBARCHIVEDIR}/test_utils CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 # Uncomment to link against dmalloc #LDADD+= -L/usr/local/lib -ldmalloc #CFLAGS+= -I/usr/local/include -DUSE_DMALLOC -.PATH: ${LIBARCHIVEDIR}/libarchive/test +.PATH: ${_LIBARCHIVEDIR}/libarchive/test TESTS_SRCS= \ test_acl_freebsd_nfs4.c \ test_acl_freebsd_posix1e.c \ @@ -249,12 +249,12 @@ SRCS.libarchive_test= \ LIBADD.libarchive_test=archive -.PATH: ${LIBARCHIVEDIR}/test_utils +.PATH: ${_LIBARCHIVEDIR}/test_utils SRCS.libarchive_test+= test_utils.c # list.h is just a list of all tests, as indicated by DEFINE_TEST macro lines list.h: ${TESTS_SRCS} Makefile - @(cd ${LIBARCHIVEDIR}/libarchive/test && \ + @(cd ${_LIBARCHIVEDIR}/libarchive/test && \ grep -h DEFINE_TEST ${.ALLSRC:N*Makefile} | \ egrep -v '${BROKEN_TESTS:tW:C/ /|/g}') > ${.TARGET}.tmp @mv ${.TARGET}.tmp ${.TARGET} Modified: head/lib/libbsm/Makefile == --- head/lib/libbsm/MakefileTue Dec 1 22:19:17 2015(r291619) +++ head/lib/libbsm/MakefileTue Dec 1 22:20:04 2015(r291620) @@ -3,12 +3,12 @@ # OPENBSMDIR=${.CURDIR}/../../contrib/openbsm -LIBBSMDIR= ${OPENBSMDIR}/libbsm +_LIBBSMDIR=${OPENBSMDIR}/libbsm LIB= bsm SHLIB_MAJOR= 3 -.PATH: ${LIBBSMDIR} +.PATH: ${_LIBBSMDIR} .PATH: ${OPENBSMDIR}/bsm .PATH: ${OPENBSMDIR}/man @@ -31,7 +31,7 @@ SRCS= bsm_audit.c \ # # Must use BSM include files from within the contrib area, not the system. # -CFLAGS+= -I${OPENBSMDIR} -I${LIBBSMDIR} +CFLAGS+= -I${OPENBSMDIR} -I${_LIBBSMDIR} WARNS?=1 Modified: head/lib/libc++/Makefile == --- head/lib/libc++/MakefileTue Dec 1 22:19:17 2015(r291619) +++ head/lib/libc++/MakefileTue Dec 1 22:20:04 2015(r291620) @@ -2,7 +2,7 @@ .include -LIBCXXRTDIR= ${.CURDIR}/../../contrib/libcxxrt +_LIBCXXRTDIR= ${.CURDIR}/../../contrib/libcxxrt HDRDIR=${.CURDIR}/../../contrib/libc++/include SRCDIR=${.CURDIR}/../../contrib/libc++/src CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLIB_MAJOR} @@ -52,12 +52,12 @@ CXXRT_SRCS+=libelftc_dem_gnu3.c\ .for _S in ${CXXRT_SRCS} STATICOBJS+= cxxrt_${_S:R}.o -cxxrt_${_S}: ${LIBCXXRTDIR}/${_S} .NOMETA +cxxrt_${_S}: ${_LIBCXXRTDIR}/${_S} .NOMETA ln -sf ${.ALLSRC} ${.TARGET} .endfor WARNS= 0 -CFLAGS+=
svn commit: r291621 - head/sbin/ipf
Author: bdrewery Date: Tue Dec 1 22:39:19 2015 New Revision: 291621 URL: https://svnweb.freebsd.org/changeset/base/291621 Log: Don't add LIBADD=ipf to libipf itself. This had no real impact since libipf is a static INTERNALLIB. It does conflict with an assertion I am adding for LIBADD though. Sponsored by: EMC / Isilon Storage Division Modified: head/sbin/ipf/Makefile.inc Modified: head/sbin/ipf/Makefile.inc == --- head/sbin/ipf/Makefile.inc Tue Dec 1 22:20:04 2015(r291620) +++ head/sbin/ipf/Makefile.inc Tue Dec 1 22:39:19 2015(r291621) @@ -18,7 +18,9 @@ CFLAGS+= -DUSE_INET6 CFLAGS+= -DNOINET6 .endif +.if ${.CURDIR:M*/libipf} == "" LIBADD+= ipf +.endif CLEANFILES+= y.tab.c y.tab.h ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291622 - head/libexec/rtld-elf
Author: bdrewery Date: Tue Dec 1 22:50:32 2015 New Revision: 291622 URL: https://svnweb.freebsd.org/changeset/base/291622 Log: Fix build after r291620. "don't know how to make /Versions.def. Stop" This was trying to define a target in bsd.symver.mk based on LIBCDIR which was not yet defined. Switching the order of inclusion of bsd.prog.mk and bsd.symver.mk fixes it and seems fine. Pointyhat to: bdrewery Sponsored by: EMC / Isilon Storage Division Modified: head/libexec/rtld-elf/Makefile Modified: head/libexec/rtld-elf/Makefile == --- head/libexec/rtld-elf/Makefile Tue Dec 1 22:39:19 2015 (r291621) +++ head/libexec/rtld-elf/Makefile Tue Dec 1 22:50:32 2015 (r291622) @@ -85,5 +85,5 @@ beforeinstall: SUBDIR+= tests .endif -.include .include +.include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291623 - head/share/mk
Author: bdrewery Date: Wed Dec 2 00:01:09 2015 New Revision: 291623 URL: https://svnweb.freebsd.org/changeset/base/291623 Log: Add assertions that capture invalid configurations for new libraries. Fix current findings. Given libfoo: - Ensure that a LIBFOO is set. For INTERNALLIBS advise setting this in src.libnames.mk, otherwise bsd.libnames.mk. - Ensure that a LIBFOODIR is properly set. - Ensure that _DP_foo is set and matches the LIBADD in the build of foo's own Makefile Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk Modified: head/share/mk/bsd.libnames.mk == --- head/share/mk/bsd.libnames.mk Tue Dec 1 22:50:32 2015 (r291622) +++ head/share/mk/bsd.libnames.mk Wed Dec 2 00:01:09 2015 (r291623) @@ -42,6 +42,7 @@ LIBCRYPT?=${DESTDIR}${LIBDIR}/libcrypt. LIBCRYPTO?=${DESTDIR}${LIBDIR}/libcrypto.a LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a LIBCURSES?=${DESTDIR}${LIBDIR}/libcurses.a +LIBCUSE?= ${DESTDIR}${LIBDIR}/libcuse.a LIBDEVCTL?=${DESTDIR}${LIBDIR}/libdevctl.a LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a @@ -98,6 +99,7 @@ LIBNVPAIR?= ${DESTDIR}${LIBDIR}/libnvpai LIBOPIE?= ${DESTDIR}${LIBDIR}/libopie.a LIBPAM?= ${DESTDIR}${LIBDIR}/libpam.a LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel.a +LIBPANELW?=${DESTDIR}${LIBDIR}/libpanelw.a LIBPCAP?= ${DESTDIR}${LIBDIR}/libpcap.a LIBPJDLOG?=${DESTDIR}${LIBDIR}/libpjdlog.a LIBPMC?= ${DESTDIR}${LIBDIR}/libpmc.a @@ -117,6 +119,7 @@ LIBSSL?=${DESTDIR}${LIBDIR}/libssl.a LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR}/libssp_nonshared.a LIBSTAND?= ${DESTDIR}${LIBDIR}/libstand.a LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a +LIBSTDTHREADS?=${DESTDIR}${LIBDIR}/libstdthreads.a LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a LIBTERMCAP?= ${DESTDIR}${LIBDIR}/libtermcap.a LIBTERMCAPW?= ${DESTDIR}${LIBDIR}/libtermcapw.a @@ -155,6 +158,13 @@ LDADD:=${LDADD:N-lc} -lc # Only do this for src builds. .if defined(SRCTOP) +.if defined(_LIBRARIES) && defined(LIB) && \ +${_LIBRARIES:M${LIB}} != "" +.if !defined(LIB${LIB:tu}) +.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${DESTDIR}$${LIBDIR}/lib${LIB}.a +.endif +.endif + # Derive LIB*SRCDIR from LIB*DIR .for lib in ${_LIBRARIES} LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Tue Dec 1 22:50:32 2015 (r291622) +++ head/share/mk/src.libnames.mk Wed Dec 2 00:01:09 2015 (r291623) @@ -163,6 +163,8 @@ _LIBRARIES= \ ypclnt \ z +# Each library's LIBADD needs to be duplicated here for static linkage of +# 2nd+ order consumers. _DP_80211= sbuf bsdxml _DP_archive= z bz2 lzma bsdxml .if ${MK_OPENSSL} != "no" @@ -170,6 +172,7 @@ _DP_archive+= crypto .else _DP_archive+= md .endif +_DP_sqlite3= pthread _DP_ssl= crypto _DP_ssh= crypto crypt .if ${MK_LDNS} != "no" @@ -217,7 +220,7 @@ _DP_fetch= md .endif _DP_execinfo= elf _DP_dwarf= elf -_DP_dpv= dialog figpar util +_DP_dpv= dialog figpar util ncursesw _DP_dialog=ncursesw m _DP_cuse= pthread _DP_atf_cxx= atf_c @@ -232,16 +235,39 @@ _DP_pam+= ssh .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif -_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc \ - pthread +_DP_readline= ncursesw +_DP_roken= crypt +_DP_kadm5clnt= com_err krb5 roken +_DP_kadm5srv= com_err hdb krb5 roken +_DP_heimntlm= crypto com_err krb5 roken +_DP_hx509= asn1 com_err crypto roken wind +_DP_hdb= asn1 com_err krb5 roken sqlite3 +_DP_asn1= com_err roken +_DP_kdc= roken hdb hx509 krb5 heimntlm asn1 crypto +_DP_wind= com_err roken +_DP_heimbase= pthread +_DP_heimipcc= heimbase roken pthread +_DP_heimipcs= heimbase roken pthread +_DP_kafs5= asn1 krb5 roken +_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc _DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err _DP_lzma= pthread _DP_ucl= m _DP_vmmapi=util _DP_ctf= z _DP_proc= rtld_db util -_DP_dtrace=rtld_db pthread +_DP_dtrace=ctf elf proc pthread rtld_db _DP_xo=util +# The libc dependencies are not strictly needed but are defined to make the +# assert happy. +_DP_c= compiler_rt +.if ${MK_SSP} != "no" +_DP_c+=ssp_nonshared +.endif +_DP_stdthreads=pthread +_DP_tacplus= md +_DP_panel= ncurses +_DP_panelw=ncursesw # Define spacial cases LDADD_supcplusplus=-l
Re: svn commit: r291623 - head/share/mk
On 12/1/2015 4:01 PM, Bryan Drewery wrote: > +.info ${.CURDIR}: Missing or incorrect _DP_${LIB} entry in ${_this:T}. > Should match LIBADD for ${LIB} ('${LIBADD}' vs '${_DP_${LIB}}') Meant to be .error. Retesting. -- Regards, Bryan Drewery signature.asc Description: OpenPGP digital signature
svn commit: r291624 - head/share/mk
Author: bdrewery Date: Wed Dec 2 00:17:13 2015 New Revision: 291624 URL: https://svnweb.freebsd.org/changeset/base/291624 Log: Revert incomplete r291623. Modified: head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk Modified: head/share/mk/bsd.libnames.mk == --- head/share/mk/bsd.libnames.mk Wed Dec 2 00:01:09 2015 (r291623) +++ head/share/mk/bsd.libnames.mk Wed Dec 2 00:17:13 2015 (r291624) @@ -42,7 +42,6 @@ LIBCRYPT?=${DESTDIR}${LIBDIR}/libcrypt. LIBCRYPTO?=${DESTDIR}${LIBDIR}/libcrypto.a LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a LIBCURSES?=${DESTDIR}${LIBDIR}/libcurses.a -LIBCUSE?= ${DESTDIR}${LIBDIR}/libcuse.a LIBDEVCTL?=${DESTDIR}${LIBDIR}/libdevctl.a LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a @@ -99,7 +98,6 @@ LIBNVPAIR?= ${DESTDIR}${LIBDIR}/libnvpai LIBOPIE?= ${DESTDIR}${LIBDIR}/libopie.a LIBPAM?= ${DESTDIR}${LIBDIR}/libpam.a LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel.a -LIBPANELW?=${DESTDIR}${LIBDIR}/libpanelw.a LIBPCAP?= ${DESTDIR}${LIBDIR}/libpcap.a LIBPJDLOG?=${DESTDIR}${LIBDIR}/libpjdlog.a LIBPMC?= ${DESTDIR}${LIBDIR}/libpmc.a @@ -119,7 +117,6 @@ LIBSSL?=${DESTDIR}${LIBDIR}/libssl.a LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR}/libssp_nonshared.a LIBSTAND?= ${DESTDIR}${LIBDIR}/libstand.a LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a -LIBSTDTHREADS?=${DESTDIR}${LIBDIR}/libstdthreads.a LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a LIBTERMCAP?= ${DESTDIR}${LIBDIR}/libtermcap.a LIBTERMCAPW?= ${DESTDIR}${LIBDIR}/libtermcapw.a @@ -158,13 +155,6 @@ LDADD:=${LDADD:N-lc} -lc # Only do this for src builds. .if defined(SRCTOP) -.if defined(_LIBRARIES) && defined(LIB) && \ -${_LIBRARIES:M${LIB}} != "" -.if !defined(LIB${LIB:tu}) -.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${DESTDIR}$${LIBDIR}/lib${LIB}.a -.endif -.endif - # Derive LIB*SRCDIR from LIB*DIR .for lib in ${_LIBRARIES} LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Wed Dec 2 00:01:09 2015 (r291623) +++ head/share/mk/src.libnames.mk Wed Dec 2 00:17:13 2015 (r291624) @@ -163,8 +163,6 @@ _LIBRARIES= \ ypclnt \ z -# Each library's LIBADD needs to be duplicated here for static linkage of -# 2nd+ order consumers. _DP_80211= sbuf bsdxml _DP_archive= z bz2 lzma bsdxml .if ${MK_OPENSSL} != "no" @@ -172,7 +170,6 @@ _DP_archive+= crypto .else _DP_archive+= md .endif -_DP_sqlite3= pthread _DP_ssl= crypto _DP_ssh= crypto crypt .if ${MK_LDNS} != "no" @@ -220,7 +217,7 @@ _DP_fetch= md .endif _DP_execinfo= elf _DP_dwarf= elf -_DP_dpv= dialog figpar util ncursesw +_DP_dpv= dialog figpar util _DP_dialog=ncursesw m _DP_cuse= pthread _DP_atf_cxx= atf_c @@ -235,39 +232,16 @@ _DP_pam+= ssh .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif -_DP_readline= ncursesw -_DP_roken= crypt -_DP_kadm5clnt= com_err krb5 roken -_DP_kadm5srv= com_err hdb krb5 roken -_DP_heimntlm= crypto com_err krb5 roken -_DP_hx509= asn1 com_err crypto roken wind -_DP_hdb= asn1 com_err krb5 roken sqlite3 -_DP_asn1= com_err roken -_DP_kdc= roken hdb hx509 krb5 heimntlm asn1 crypto -_DP_wind= com_err roken -_DP_heimbase= pthread -_DP_heimipcc= heimbase roken pthread -_DP_heimipcs= heimbase roken pthread -_DP_kafs5= asn1 krb5 roken -_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc +_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc \ + pthread _DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err _DP_lzma= pthread _DP_ucl= m _DP_vmmapi=util _DP_ctf= z _DP_proc= rtld_db util -_DP_dtrace=ctf elf proc pthread rtld_db +_DP_dtrace=rtld_db pthread _DP_xo=util -# The libc dependencies are not strictly needed but are defined to make the -# assert happy. -_DP_c= compiler_rt -.if ${MK_SSP} != "no" -_DP_c+=ssp_nonshared -.endif -_DP_stdthreads=pthread -_DP_tacplus= md -_DP_panel= ncurses -_DP_panelw=ncursesw # Define spacial cases LDADD_supcplusplus=-lsupc++ @@ -317,7 +291,6 @@ DPADD_dtrace+= ${DPADD_ctf} ${DPADD_elf} LDADD_dtrace+= ${LDADD_ctf} ${LDADD_elf} ${LDADD_proc} # The following depends on libraries which are using pthread -# XXX: These vars are always empty DPADD_hdb+=${DPADD_pthread} LDADD_hdb+=${LDADD_pthread} DPADD_kadm5srv+= ${DPADD_pthread} @@ -333,10 +306,9 @@ LDADD+=${LDADD_${_l}} .endfor
svn commit: r291627 - in head: cddl/usr.sbin cddl/usr.sbin/plockstat targets/pseudo/userland/cddl tools/build/mk
Author: bdrewery Date: Wed Dec 2 00:49:45 2015 New Revision: 291627 URL: https://svnweb.freebsd.org/changeset/base/291627 Log: Fully connect cddl/usr.sbin/plockstat. There seems to be no reason to keep this so private. Also add missing optional MK_CDDL files. Sponsored by: EMC / Isilon Storage Division Added: head/cddl/usr.sbin/plockstat/Makefile.depend (contents, props changed) Modified: head/cddl/usr.sbin/Makefile head/targets/pseudo/userland/cddl/Makefile.depend head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/cddl/usr.sbin/Makefile == --- head/cddl/usr.sbin/Makefile Wed Dec 2 00:49:42 2015(r291626) +++ head/cddl/usr.sbin/Makefile Wed Dec 2 00:49:45 2015(r291627) @@ -25,10 +25,8 @@ _zhack= zhack _dtrace= dtrace _dtruss= dtruss _lockstat= lockstat -.if defined(WITH_PLOCKSTAT) _plockstat=plockstat .endif -.endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "arm" _dtrace= dtrace Added: head/cddl/usr.sbin/plockstat/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/usr.sbin/plockstat/Makefile.dependWed Dec 2 00:49:45 2015(r291627) @@ -0,0 +1,27 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + cddl/lib/libctf \ + cddl/lib/libdtrace \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libcxxrt \ + lib/libelf \ + lib/libproc \ + lib/librtld_db \ + lib/libthr \ + lib/libutil \ + lib/libz \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Modified: head/targets/pseudo/userland/cddl/Makefile.depend == --- head/targets/pseudo/userland/cddl/Makefile.depend Wed Dec 2 00:49:42 2015(r291626) +++ head/targets/pseudo/userland/cddl/Makefile.depend Wed Dec 2 00:49:45 2015(r291627) @@ -20,6 +20,7 @@ DIRDEPS = \ cddl/usr.sbin/dtrace \ cddl/usr.sbin/dtruss \ cddl/usr.sbin/lockstat \ + cddl/usr.sbin/plockstat \ DIRDEPS.ZFS = \ Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Dec 2 00:49:42 2015(r291626) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Dec 2 00:49:45 2015(r291627) @@ -978,7 +978,11 @@ OLD_FILES+=usr/lib32/libuutil_p.a OLD_LIBS+=lib/libdtrace.so.2 OLD_FILES+=usr/sbin/dtrace OLD_FILES+=usr/sbin/lockstat +OLD_FILES+=usr/sbin/plockstat OLD_FILES+=usr/share/man/man1/dtrace.1.gz +OLD_FILES+=usr/share/man/man1/dtruss.1.gz +OLD_FILES+=usr/share/man/man1/lockstat.1.gz +OLD_FILES+=usr/share/man/man1/plockstat.1.gz OLD_FILES+=usr/share/dtrace/disklatency OLD_FILES+=usr/share/dtrace/disklatencycmd OLD_FILES+=usr/share/dtrace/hotopen ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291626 - head/share/mk
Author: bdrewery Date: Wed Dec 2 00:49:42 2015 New Revision: 291626 URL: https://svnweb.freebsd.org/changeset/base/291626 Log: Don't overlink libmt consumers with libsbuf. This change came in r281332 which was reducing overlinking in mt(1) but currently mt(1) is linked with sbuf when it does not need it due to the LDADD_mt+=${LDADD_sbuf}. Only libmt needs sbuf. Add sbuf to _DP_mt so static linkage of libmt picks it up. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Wed Dec 2 00:49:39 2015 (r291625) +++ head/share/mk/src.libnames.mk Wed Dec 2 00:49:42 2015 (r291626) @@ -208,7 +208,7 @@ _DP_proc+= ctf _DP_mp=crypto _DP_memstat= kvm _DP_magic= z -_DP_mt=bsdxml +_DP_mt=sbuf bsdxml _DP_ldns= crypto .if ${MK_OPENSSL} != "no" _DP_fetch= ssl crypto @@ -284,9 +284,6 @@ LDADD_fifolog+= ${LDADD_z} DPADD_ipf+=${DPADD_kvm} LDADD_ipf+=${LDADD_kvm} -DPADD_mt+= ${DPADD_sbuf} -LDADD_mt+= ${LDADD_sbuf} - DPADD_dtrace+= ${DPADD_ctf} ${DPADD_elf} ${DPADD_proc} LDADD_dtrace+= ${LDADD_ctf} ${LDADD_elf} ${LDADD_proc} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291625 - head/share/mk
Author: bdrewery Date: Wed Dec 2 00:49:39 2015 New Revision: 291625 URL: https://svnweb.freebsd.org/changeset/base/291625 Log: libssh uses libz even without MK_LDNS Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Wed Dec 2 00:17:13 2015 (r291624) +++ head/share/mk/src.libnames.mk Wed Dec 2 00:49:39 2015 (r291625) @@ -171,9 +171,9 @@ _DP_archive+= crypto _DP_archive+= md .endif _DP_ssl= crypto -_DP_ssh= crypto crypt +_DP_ssh= crypto crypt z .if ${MK_LDNS} != "no" -_DP_ssh+= ldns z +_DP_ssh+= ldns .endif _DP_edit= ncursesw .if ${MK_OPENSSL} != "no" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291628 - in head: cddl/usr.sbin/dtrace share/mk
Author: bdrewery Date: Wed Dec 2 00:49:49 2015 New Revision: 291628 URL: https://svnweb.freebsd.org/changeset/base/291628 Log: Reduce overlinking of libdtrace consumers with libctf, libelf, libproc. The proper place for this list is _DP_dtrace. Due to removing the LDADD_dtrace, more LIBADD are needed in cddl/usr.sbin/dtrace to prevent underlinking. This fixes overlinking in cddl/usr.sbin/lockstat and cddl/usr.sbin/plockstat. Sponsored by: EMC / Isilon Storage Division Modified: head/cddl/usr.sbin/dtrace/Makefile head/share/mk/src.libnames.mk Modified: head/cddl/usr.sbin/dtrace/Makefile == --- head/cddl/usr.sbin/dtrace/Makefile Wed Dec 2 00:49:45 2015 (r291627) +++ head/cddl/usr.sbin/dtrace/Makefile Wed Dec 2 00:49:49 2015 (r291628) @@ -22,7 +22,7 @@ CFLAGS+= -I${.CURDIR}/../../../sys/cddl/ #CFLAGS+= -DNEED_ERRLOC #YFLAGS+= -d -LIBADD=dtrace +LIBADD=dtrace ctf elf proc .if ${MK_DTRACE_TESTS} != "no" SUBDIR+= tests Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Wed Dec 2 00:49:45 2015 (r291627) +++ head/share/mk/src.libnames.mk Wed Dec 2 00:49:49 2015 (r291628) @@ -240,7 +240,7 @@ _DP_ucl=m _DP_vmmapi=util _DP_ctf= z _DP_proc= rtld_db util -_DP_dtrace=rtld_db pthread +_DP_dtrace=ctf elf proc pthread rtld_db _DP_xo=util # Define spacial cases @@ -284,9 +284,6 @@ LDADD_fifolog+= ${LDADD_z} DPADD_ipf+=${DPADD_kvm} LDADD_ipf+=${LDADD_kvm} -DPADD_dtrace+= ${DPADD_ctf} ${DPADD_elf} ${DPADD_proc} -LDADD_dtrace+= ${LDADD_ctf} ${LDADD_elf} ${LDADD_proc} - # The following depends on libraries which are using pthread DPADD_hdb+=${DPADD_pthread} LDADD_hdb+=${LDADD_pthread} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291629 - head/share/mk
Author: bdrewery Date: Wed Dec 2 00:54:05 2015 New Revision: 291629 URL: https://svnweb.freebsd.org/changeset/base/291629 Log: Fix truncation of _DP_proc and add missing libelf. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Wed Dec 2 00:49:49 2015 (r291628) +++ head/share/mk/src.libnames.mk Wed Dec 2 00:54:05 2015 (r291629) @@ -205,6 +205,7 @@ _DP_proc= supcplusplus .if ${MK_CDDL} != "no" _DP_proc+= ctf .endif +_DP_proc+= elf rtld_db util _DP_mp=crypto _DP_memstat= kvm _DP_magic= z @@ -239,7 +240,6 @@ _DP_lzma= pthread _DP_ucl= m _DP_vmmapi=util _DP_ctf= z -_DP_proc= rtld_db util _DP_dtrace=ctf elf proc pthread rtld_db _DP_xo=util ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291630 - head/share/mk
Author: bdrewery Date: Wed Dec 2 01:17:09 2015 New Revision: 291630 URL: https://svnweb.freebsd.org/changeset/base/291630 Log: Don't overlink pthread to libsqlite3 consumers. At least usr.bin/mandoc was overlink. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Wed Dec 2 00:54:05 2015 (r291629) +++ head/share/mk/src.libnames.mk Wed Dec 2 01:17:09 2015 (r291630) @@ -170,6 +170,7 @@ _DP_archive+= crypto .else _DP_archive+= md .endif +_DP_sqlite3= pthread _DP_ssl= crypto _DP_ssh= crypto crypt z .if ${MK_LDNS} != "no" @@ -275,9 +276,6 @@ LDADD_${_l}+= ${LDADD_${_d}} DPADD_atf_cxx+=${DPADD_atf_c} LDADD_atf_cxx+=${LDADD_atf_c} -DPADD_sqlite3+=${DPADD_pthread} -LDADD_sqlite3+=${LDADD_pthread} - DPADD_fifolog+=${DPADD_z} LDADD_fifolog+=${LDADD_z} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291631 - head/share/mk
Author: bdrewery Date: Wed Dec 2 01:23:16 2015 New Revision: 291631 URL: https://svnweb.freebsd.org/changeset/base/291631 Log: Don't overlink pthread to kerberos library consumers. I'm not sure why this was here, none of these use pthread themselves and none of the consumers are broken with removing this. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Wed Dec 2 01:17:09 2015 (r291630) +++ head/share/mk/src.libnames.mk Wed Dec 2 01:23:16 2015 (r291631) @@ -282,16 +282,6 @@ LDADD_fifolog+=${LDADD_z} DPADD_ipf+=${DPADD_kvm} LDADD_ipf+=${LDADD_kvm} -# The following depends on libraries which are using pthread -DPADD_hdb+=${DPADD_pthread} -LDADD_hdb+=${LDADD_pthread} -DPADD_kadm5srv+= ${DPADD_pthread} -LDADD_kadm5srv+= ${LDADD_pthread} -DPADD_krb5+= ${DPADD_pthread} -LDADD_krb5+= ${LDADD_pthread} -DPADD_gssapi_krb5+=${DPADD_pthread} -LDADD_gssapi_krb5+=${LDADD_pthread} - .for _l in ${LIBADD} DPADD+=${DPADD_${_l}:Umissing-dpadd_${_l}} LDADD+=${LDADD_${_l}} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291632 - head/share/mk
Author: bdrewery Date: Wed Dec 2 01:24:31 2015 New Revision: 291632 URL: https://svnweb.freebsd.org/changeset/base/291632 Log: Add assertions that capture invalid configurations for new libraries. Fix current findings, which should fix cases of NO_SHARED not building properly. Given libfoo: - Ensure that a LIBFOO is set. For INTERNALLIBS advise setting this in src.libnames.mk, otherwise bsd.libnames.mk. - Ensure that a LIBFOODIR is properly set. - Ensure that _DP_foo is set and matches the LIBADD in the build of foo's own Makefile Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk Modified: head/share/mk/bsd.libnames.mk == --- head/share/mk/bsd.libnames.mk Wed Dec 2 01:23:16 2015 (r291631) +++ head/share/mk/bsd.libnames.mk Wed Dec 2 01:24:31 2015 (r291632) @@ -42,6 +42,7 @@ LIBCRYPT?=${DESTDIR}${LIBDIR}/libcrypt. LIBCRYPTO?=${DESTDIR}${LIBDIR}/libcrypto.a LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a LIBCURSES?=${DESTDIR}${LIBDIR}/libcurses.a +LIBCUSE?= ${DESTDIR}${LIBDIR}/libcuse.a LIBDEVCTL?=${DESTDIR}${LIBDIR}/libdevctl.a LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a @@ -98,6 +99,7 @@ LIBNVPAIR?= ${DESTDIR}${LIBDIR}/libnvpai LIBOPIE?= ${DESTDIR}${LIBDIR}/libopie.a LIBPAM?= ${DESTDIR}${LIBDIR}/libpam.a LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel.a +LIBPANELW?=${DESTDIR}${LIBDIR}/libpanelw.a LIBPCAP?= ${DESTDIR}${LIBDIR}/libpcap.a LIBPJDLOG?=${DESTDIR}${LIBDIR}/libpjdlog.a LIBPMC?= ${DESTDIR}${LIBDIR}/libpmc.a @@ -117,6 +119,7 @@ LIBSSL?=${DESTDIR}${LIBDIR}/libssl.a LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR}/libssp_nonshared.a LIBSTAND?= ${DESTDIR}${LIBDIR}/libstand.a LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a +LIBSTDTHREADS?=${DESTDIR}${LIBDIR}/libstdthreads.a LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a LIBTERMCAP?= ${DESTDIR}${LIBDIR}/libtermcap.a LIBTERMCAPW?= ${DESTDIR}${LIBDIR}/libtermcapw.a @@ -155,6 +158,13 @@ LDADD:=${LDADD:N-lc} -lc # Only do this for src builds. .if defined(SRCTOP) +.if defined(_LIBRARIES) && defined(LIB) && \ +${_LIBRARIES:M${LIB}} != "" +.if !defined(LIB${LIB:tu}) +.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${DESTDIR}$${LIBDIR}/lib${LIB}.a +.endif +.endif + # Derive LIB*SRCDIR from LIB*DIR .for lib in ${_LIBRARIES} LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Wed Dec 2 01:23:16 2015 (r291631) +++ head/share/mk/src.libnames.mk Wed Dec 2 01:24:31 2015 (r291632) @@ -163,6 +163,8 @@ _LIBRARIES= \ ypclnt \ z +# Each library's LIBADD needs to be duplicated here for static linkage of +# 2nd+ order consumers. Auto-generating this would be better. _DP_80211= sbuf bsdxml _DP_archive= z bz2 lzma bsdxml .if ${MK_OPENSSL} != "no" @@ -188,7 +190,7 @@ _DP_kvm=elf _DP_pjdlog=util _DP_opie= md _DP_usb= pthread -_DP_unbound= pthread +_DP_unbound= ssl crypto pthread _DP_rt=pthread .if ${MK_OPENSSL} == "no" _DP_radius=md @@ -219,7 +221,7 @@ _DP_fetch= md .endif _DP_execinfo= elf _DP_dwarf= elf -_DP_dpv= dialog figpar util +_DP_dpv= dialog figpar util ncursesw _DP_dialog=ncursesw m _DP_cuse= pthread _DP_atf_cxx= atf_c @@ -234,8 +236,21 @@ _DP_pam+= ssh .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif -_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc \ - pthread +_DP_readline= ncursesw +_DP_roken= crypt +_DP_kadm5clnt= com_err krb5 roken +_DP_kadm5srv= com_err hdb krb5 roken +_DP_heimntlm= crypto com_err krb5 roken +_DP_hx509= asn1 com_err crypto roken wind +_DP_hdb= asn1 com_err krb5 roken sqlite3 +_DP_asn1= com_err roken +_DP_kdc= roken hdb hx509 krb5 heimntlm asn1 crypto +_DP_wind= com_err roken +_DP_heimbase= pthread +_DP_heimipcc= heimbase roken pthread +_DP_heimipcs= heimbase roken pthread +_DP_kafs5= asn1 krb5 roken +_DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc _DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err _DP_lzma= pthread _DP_ucl= m @@ -243,6 +258,19 @@ _DP_vmmapi=util _DP_ctf= z _DP_dtrace=ctf elf proc pthread rtld_db _DP_xo=util +# The libc dependencies are not strictly needed but are defined to make the +# assert happy. +_DP_c= compiler_rt +.if ${MK_SSP} != "no" +_DP_c+=ssp_nonshared +.endif +_DP_stdthreads=pthread +_DP_tacp
svn commit: r291633 - head/share/mk
Author: bdrewery Date: Wed Dec 2 01:47:27 2015 New Revision: 291633 URL: https://svnweb.freebsd.org/changeset/base/291633 Log: bsd.subdir.mk: Only recurse on called targets, rather than dependencies. This is to fix 'make all' causing it to recurse on both 'all' and 'buildconfig' due to 'buildconfig' being in ALL_SUBDIR_TARGETS and being a dependency of 'all'. This now adds all of the '*includes', '*files' targets as subdir targets, allowing them to recurse. This also removes the need for some 'realinstall' hacks in bsd.subdir.mk since it no longer recurses; only 'install' will recurse and call the proper 'beforeinstall', 'realinstall', and 'afterinstall' in each sub-directory. This fixes 'make includes' and 'make files' to not be a rerolled ${MAKE} sub-shell but to rather just recurse on 'inclues' and 'files'. This avoids various issues such as the one fixed in r289462. As such revert Makefile.inc1 back to using 'includes' which avoids an extra tree walk and parallelizes the includes phases better. Makefile.inc1 includes a guard so that 'make all' will not use SUBDIR_PARALLEL, added in r289438. This is so users do not get a probably broken build if they run 'make all' from the top-level. Before the change in this commit, the workaround for 'make everything' was 'par-all' which would depend on 'all' and cause a proper parallel recursion. Now that will not work so a new _PARALLEL_SUBUDIR_OK is used to allow it. This is still part of an effort to combine bsd.(files|incs|confs).mk and move some of its logic out of bsd.subdir.mk, as attempted in r289282 and reverted in r289331. This commit fixes the problems found there which was mostly double recursing during 'includes' which would recurse on itself and 'buildincludes' and 'installincludes', all in parallel. The logic is still in bsd.subdir.mk for now. I've been cautious about this commit but have experienced no breakage on the tree except for the 'par-all' case which was already a hack. If something foo is depending on something bar that should recurse, it is very likely that the foo target is being recursed on already meaning that bar will still effectively recurse once sub-directories call foo. Discussed on: arch@ MFC after:never Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk == --- head/share/mk/bsd.subdir.mk Wed Dec 2 01:24:31 2015(r291632) +++ head/share/mk/bsd.subdir.mk Wed Dec 2 01:47:27 2015(r291633) @@ -36,10 +36,11 @@ .if !target() : -ALL_SUBDIR_TARGETS= all all-man buildconfig checkdpadd clean cleandepend \ - cleandir cleanilinks cleanobj depend distribute \ - installconfig lint maninstall manlint obj objlink \ - realinstall regress tags \ +ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \ + checkdpadd clean cleandepend cleandir cleanilinks \ + cleanobj depend distribute files includes installconfig \ + installfiles installincludes install lint maninstall \ + manlint obj objlink regress tags \ ${SUBDIR_TARGETS} # Described above. @@ -71,6 +72,27 @@ distribute: .MAKE .endfor .endif +# Convenience targets to run 'build${target}' and 'install${target}' when +# calling 'make ${target}'. +.for __target in files includes +.if !target(${__target}) +${__target}: build${__target} install${__target} +.ORDER:build${__target} install${__target} +.endif +.endfor + +# Make 'install' supports a before and after target. Actual install +# hooks are placed in 'realinstall'. +.if !target(install) +.for __stage in before real after +.if !target(${__stage}install) +${__stage}install: +.endif +.endfor +install: beforeinstall realinstall afterinstall +.ORDER:beforeinstall realinstall afterinstall +.endif + # Subdir code shared among 'make ', 'make ' and SUBDIR_PARALLEL. _SUBDIR_SH=\ if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \ @@ -82,7 +104,7 @@ _SUBDIR_SH= \ _SUBDIR: .USEBEFORE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}target=${.TARGET:S,realinstall,install,}; \ + @${_+_}target=${.TARGET}; \ for dir in ${SUBDIR:N.WAIT}; do ( ${_SUBDIR_SH} ); done .endif @@ -101,6 +123,10 @@ SUBDIR:= ${SUBDIR:N.WAIT} .else _is_standalone_target= 0 .endif +# Only recurse on directly-called targets. I.e., don't recurse on dependencies +# such as 'install' becoming {before,real,after}install, just recurse +# 'install'. +.if make(${__target}) .if defined(SUBDIR_PARALLEL) || ${_is_standalone_target} == 1 __subdir_targets= .for __dir in ${SUBDIR} @@ -116,7 +142,7 @@ __deps+= ${__target}_subdir_${
svn commit: r291634 - head/share/mk
Author: bdrewery Date: Wed Dec 2 01:49:22 2015 New Revision: 291634 URL: https://svnweb.freebsd.org/changeset/base/291634 Log: Revert r291633. Some files were missed. Modified: head/share/mk/bsd.subdir.mk Modified: head/share/mk/bsd.subdir.mk == --- head/share/mk/bsd.subdir.mk Wed Dec 2 01:47:27 2015(r291633) +++ head/share/mk/bsd.subdir.mk Wed Dec 2 01:49:22 2015(r291634) @@ -36,11 +36,10 @@ .if !target() : -ALL_SUBDIR_TARGETS= all all-man buildconfig buildfiles buildincludes \ - checkdpadd clean cleandepend cleandir cleanilinks \ - cleanobj depend distribute files includes installconfig \ - installfiles installincludes install lint maninstall \ - manlint obj objlink regress tags \ +ALL_SUBDIR_TARGETS= all all-man buildconfig checkdpadd clean cleandepend \ + cleandir cleanilinks cleanobj depend distribute \ + installconfig lint maninstall manlint obj objlink \ + realinstall regress tags \ ${SUBDIR_TARGETS} # Described above. @@ -72,27 +71,6 @@ distribute: .MAKE .endfor .endif -# Convenience targets to run 'build${target}' and 'install${target}' when -# calling 'make ${target}'. -.for __target in files includes -.if !target(${__target}) -${__target}: build${__target} install${__target} -.ORDER:build${__target} install${__target} -.endif -.endfor - -# Make 'install' supports a before and after target. Actual install -# hooks are placed in 'realinstall'. -.if !target(install) -.for __stage in before real after -.if !target(${__stage}install) -${__stage}install: -.endif -.endfor -install: beforeinstall realinstall afterinstall -.ORDER:beforeinstall realinstall afterinstall -.endif - # Subdir code shared among 'make ', 'make ' and SUBDIR_PARALLEL. _SUBDIR_SH=\ if test -d ${.CURDIR}/$${dir}.${MACHINE_ARCH}; then \ @@ -104,7 +82,7 @@ _SUBDIR_SH= \ _SUBDIR: .USEBEFORE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}target=${.TARGET}; \ + @${_+_}target=${.TARGET:S,realinstall,install,}; \ for dir in ${SUBDIR:N.WAIT}; do ( ${_SUBDIR_SH} ); done .endif @@ -123,10 +101,6 @@ SUBDIR:= ${SUBDIR:N.WAIT} .else _is_standalone_target= 0 .endif -# Only recurse on directly-called targets. I.e., don't recurse on dependencies -# such as 'install' becoming {before,real,after}install, just recurse -# 'install'. -.if make(${__target}) .if defined(SUBDIR_PARALLEL) || ${_is_standalone_target} == 1 __subdir_targets= .for __dir in ${SUBDIR} @@ -142,7 +116,7 @@ __deps+= ${__target}_subdir_${__dep} .endif ${__target}_subdir_${__dir}: .PHONY .MAKE ${__deps} .if !defined(NO_SUBDIR) - @${_+_}target=${__target}; \ + @${_+_}target=${__target:realinstall=install}; \ dir=${__dir}; \ ${_SUBDIR_SH}; .endif @@ -152,11 +126,35 @@ ${__target}: ${__subdir_targets} .else ${__target}: _SUBDIR .endif # SUBDIR_PARALLEL || _is_standalone_target -.elif !target(${__target}) -${__target}: -.endif # make(${__target}) .endfor# __target in ${ALL_SUBDIR_TARGETS} -.endif # !target(_SUBDIR) +# This is to support 'make includes' calling 'make buildincludes' and +# 'make installincludes' in the proper order, and to support these +# targets as SUBDIR_TARGETS. +.for __target in files includes +.for __stage in build install +${__stage}${__target}: +.if make(${__stage}${__target}) +${__stage}${__target}: _SUBDIR +.endif +.endfor +.if !target(${__target}) +${__target}: .MAKE + ${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} +.endif +.endfor + +.endif + +.if !target(install) +.if !target(beforeinstall) +beforeinstall: +.endif +.if !target(afterinstall) +afterinstall: +.endif +install: beforeinstall realinstall afterinstall +.ORDER: beforeinstall realinstall afterinstall +.endif .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291635 - in head: . share/mk
Author: bdrewery Date: Wed Dec 2 01:50:22 2015 New Revision: 291635 URL: https://svnweb.freebsd.org/changeset/base/291635 Log: bsd.subdir.mk: Only recurse on called targets, rather than dependencies. This is to fix 'make all' causing it to recurse on both 'all' and 'buildconfig' due to 'buildconfig' being in ALL_SUBDIR_TARGETS and being a dependency of 'all'. This now adds all of the '*includes', '*files' targets as subdir targets, allowing them to recurse. This also removes the need for some 'realinstall' hacks in bsd.subdir.mk since it no longer recurses; only 'install' will recurse and call the proper 'beforeinstall', 'realinstall', and 'afterinstall' in each sub-directory. This fixes 'make includes' and 'make files' to not be a rerolled ${MAKE} sub-shell but to rather just recurse on 'inclues' and 'files'. This avoids various issues such as the one fixed in r289462. As such revert Makefile.inc1 back to using 'includes' which avoids an extra tree walk and parallelizes the includes phases better. Makefile.inc1 includes a guard so that 'make all' will not use SUBDIR_PARALLEL, added in r289438. This is so users do not get a probably broken build if they run 'make all' from the top-level. Before the change in this commit, the workaround for 'make everything' was 'par-all' which would depend on 'all' and cause a proper parallel recursion. Now that will not work so a new _PARALLEL_SUBUDIR_OK is used to allow it. This is still part of an effort to combine bsd.(files|incs|confs).mk and move some of its logic out of bsd.subdir.mk, as attempted in r289282 and reverted in r289331. This commit fixes the problems found there which was mostly double recursing during 'includes' which would recurse on itself and 'buildincludes' and 'installincludes', all in parallel. The logic is still in bsd.subdir.mk for now. I've been cautious about this commit but have experienced no breakage on the tree except for the 'par-all' case which was already a hack. If something foo is depending on something bar that should recurse, it is very likely that the foo target is being recursed on already meaning that bar will still effectively recurse once sub-directories call foo. Discussed on: arch@ MFC after:never Sponsored by: EMC / Isilon Storage Division Modified: head/Makefile.inc1 head/share/mk/bsd.subdir.mk Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Wed Dec 2 01:49:22 2015(r291634) +++ head/Makefile.inc1 Wed Dec 2 01:50:22 2015(r291635) @@ -643,12 +643,9 @@ _includes: # Special handling for SUBDIR_OVERRIDE in buildworld as they most likely need # headers from default SUBDIR. Do SUBDIR_OVERRIDE includes last. ${_+_}cd ${.CURDIR}; ${WMAKE} SUBDIR_OVERRIDE= SHARED=symlinks \ - buildincludes - ${_+_}cd ${.CURDIR}; ${WMAKE} SUBDIR_OVERRIDE= SHARED=symlinks \ - installincludes + includes .if !empty(SUBDIR_OVERRIDE) && make(buildworld) - ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks buildincludes - ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks installincludes + ${_+_}cd ${.CURDIR}; ${WMAKE} SHARED=symlinks includes .endif _libraries: @echo @@ -669,7 +666,7 @@ everything: @echo "--" @echo ">>> stage 4.4: building everything" @echo "--" - ${_+_}cd ${.CURDIR}; ${WMAKE} par-all + ${_+_}cd ${.CURDIR}; _PARALLEL_SUBUDIR_OK=1 ${WMAKE} all .if defined(LIB32TMP) build32: .PHONY @echo @@ -2010,16 +2007,15 @@ _startup_libs: ${_startup_libs:S/$/__L/} _prebuild_libs: ${_prebuild_libs:S/$/__L/} _generic_libs: ${_generic_libs:S/$/__L/} -# Enable SUBDIR_PARALLEL when not calling 'make all', unless called as -# 'par-all'. This is because it is unlikely that running 'make all' from -# the top-level, especially with a SUBDIR_OVERRIDE or LOCAL_DIRS set, -# will have a reliable build if SUBDIRs are built in parallel. This is -# safe for the world stage of buildworld though since it has already -# built libraries in a proper order and installed includes into WORLDTMP. -# Special handling is done for SUBDIR ordering for 'install*' to avoid -# trashing a system if it crashes mid-install. -par-all: all .PHONY -.if !make(all) +# Enable SUBDIR_PARALLEL when not calling 'make all', unless called from +# 'everything' with _PARALLEL_SUBUDIR_OK set. This is because it is unlikely +# that running 'make all' from the top-level, especially with a SUBDIR_OVERRIDE +# or LOCAL_DIRS set, will have a reliable build if SUBDIRs are built in +# parallel. This is safe for the world stage of buildworld though since it has +# already built libraries in a proper order and installed includes into +# WORLDTMP. Special handli
svn commit: r291637 - head/cddl/contrib/opensolaris/cmd/plockstat
Author: bdrewery Date: Wed Dec 2 02:11:38 2015 New Revision: 291637 URL: https://svnweb.freebsd.org/changeset/base/291637 Log: Fix the build for non-amd64. Modified: head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c Modified: head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c == --- head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c Wed Dec 2 01:55:14 2015(r291636) +++ head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c Wed Dec 2 02:11:38 2015(r291637) @@ -515,7 +515,7 @@ getsym(struct ps_prochandle *P, uintptr_ if (P == NULL || Pxlookup_by_addr(P, addr, name, sizeof (name), &sym, &info) != 0) { - (void) snprintf(buf, size, "%#lx", addr); + (void) snprintf(buf, size, "%#lx", (unsigned long)addr); return (0); } #ifdef illumos @@ -537,7 +537,7 @@ getsym(struct ps_prochandle *P, uintptr_ size -= len; if (sym.st_value != addr) - len = snprintf(buf, size, "+%#lx", addr - sym.st_value); + len = snprintf(buf, size, "+%#lx", (unsigned long)(addr - sym.st_value)); if (nolocks && strcmp("libc.so.1", map->pr_mapname) == 0 && (strstr("mutex", name) == 0 || ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291638 - head/sys/fs/nfs
Author: rmacklem Date: Wed Dec 2 02:47:13 2015 New Revision: 291638 URL: https://svnweb.freebsd.org/changeset/base/291638 Log: Fix the memory leak that occurs when the nfscommon.ko module is unloaded. This leak was introduced by r291527. Since the nfscommon.ko module is rarely unloaded, this leak would not have been much of an issue. MFC after:2 weeks Modified: head/sys/fs/nfs/nfs_commonport.c head/sys/fs/nfs/nfs_commonsubs.c head/sys/fs/nfs/nfs_var.h Modified: head/sys/fs/nfs/nfs_commonport.c == --- head/sys/fs/nfs/nfs_commonport.cWed Dec 2 02:11:38 2015 (r291637) +++ head/sys/fs/nfs/nfs_commonport.cWed Dec 2 02:47:13 2015 (r291638) @@ -623,6 +623,8 @@ nfscommon_modevent(module_t mod, int typ nfsd_call_nfscommon = NULL; callout_drain(&newnfsd_callout); + /* Clean out the name<-->id cache. */ + nfsrv_cleanusergroup(); /* and get rid of the mutexes */ mtx_destroy(&nfs_nameid_mutex); mtx_destroy(&newnfsd_mtx); Modified: head/sys/fs/nfs/nfs_commonsubs.c == --- head/sys/fs/nfs/nfs_commonsubs.cWed Dec 2 02:11:38 2015 (r291637) +++ head/sys/fs/nfs/nfs_commonsubs.cWed Dec 2 02:47:13 2015 (r291638) @@ -3546,6 +3546,55 @@ nfsrv_removeuser(struct nfsusrgrp *usrp, } /* + * Free up all the allocations related to the name<-->id cache. + * This function should only be called when the nfsuserd daemon isn't + * running, since it doesn't do any locking. + * This function is meant to be used when the nfscommon module is unloaded. + */ +APPLESTATIC void +nfsrv_cleanusergroup(void) +{ + struct nfsrv_lughash *hp, *hp2; + struct nfsusrgrp *nusrp, *usrp; + int i; + + if (nfsuserhash == NULL) + return; + + for (i = 0; i < nfsrv_lughashsize; i++) { + hp = &nfsuserhash[i]; + TAILQ_FOREACH_SAFE(usrp, &hp->lughead, lug_numhash, nusrp) { + TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); + hp2 = NFSUSERNAMEHASH(usrp->lug_name, + usrp->lug_namelen); + TAILQ_REMOVE(&hp2->lughead, usrp, lug_namehash); + if (usrp->lug_cred != NULL) + crfree(usrp->lug_cred); + free(usrp, M_NFSUSERGROUP); + } + hp = &nfsgrouphash[i]; + TAILQ_FOREACH_SAFE(usrp, &hp->lughead, lug_numhash, nusrp) { + TAILQ_REMOVE(&hp->lughead, usrp, lug_numhash); + hp2 = NFSGROUPNAMEHASH(usrp->lug_name, + usrp->lug_namelen); + TAILQ_REMOVE(&hp2->lughead, usrp, lug_namehash); + if (usrp->lug_cred != NULL) + crfree(usrp->lug_cred); + free(usrp, M_NFSUSERGROUP); + } + mtx_destroy(&nfsuserhash[i].mtx); + mtx_destroy(&nfsusernamehash[i].mtx); + mtx_destroy(&nfsgroupnamehash[i].mtx); + mtx_destroy(&nfsgrouphash[i].mtx); + } + free(nfsuserhash, M_NFSUSERGROUP); + free(nfsusernamehash, M_NFSUSERGROUP); + free(nfsgrouphash, M_NFSUSERGROUP); + free(nfsgroupnamehash, M_NFSUSERGROUP); + free(nfsrv_dnsname, M_NFSSTRING); +} + +/* * This function scans a byte string and checks for UTF-8 compliance. * It returns 0 if it conforms and NFSERR_INVAL if not. */ Modified: head/sys/fs/nfs/nfs_var.h == --- head/sys/fs/nfs/nfs_var.h Wed Dec 2 02:11:38 2015(r291637) +++ head/sys/fs/nfs/nfs_var.h Wed Dec 2 02:47:13 2015(r291638) @@ -283,6 +283,7 @@ void nfsv4_getref(struct nfsv4lock *, in int nfsv4_getref_nonblock(struct nfsv4lock *); int nfsv4_testlock(struct nfsv4lock *); int nfsrv_mtostr(struct nfsrv_descript *, char *, int); +void nfsrv_cleanusergroup(void); int nfsrv_checkutf8(u_int8_t *, int); int newnfs_sndlock(int *); void newnfs_sndunlock(int *); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r291637 - head/cddl/contrib/opensolaris/cmd/plockstat
On Tue, Dec 1, 2015 at 6:11 PM, Bryan Drewery wrote: > - (void) snprintf(buf, size, "%#lx", addr); > + (void) snprintf(buf, size, "%#lx", (unsigned long)addr); > return (0); > In the past when I've hit these types of problems, I have found that using %#jx and casting to (uintmax_t) instead seemed to work consistently across different platforms, so you might want to do that here. There are lots of examples in the tree of this pattern. -- Craig ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r291637 - head/cddl/contrib/opensolaris/cmd/plockstat
On Tue, Dec 1, 2015 at 10:18 PM, Craig Rodrigues wrote: > On Tue, Dec 1, 2015 at 6:11 PM, Bryan Drewery > wrote: > > > - (void) snprintf(buf, size, "%#lx", addr); > > + (void) snprintf(buf, size, "%#lx", (unsigned long)addr); > > return (0); > > > > In the past when I've hit these types of problems, > I have found that using %#jx and casting to (uintmax_t) instead seemed to > work > consistently across different platforms, so you might want to do that here. > There are lots of examples in the tree of this pattern. > Any sort of cast will usually work, provided the casted-to type matches the format string. The main issue is when one tries to avoid a cast, in which case the fundamental type corresponding to the abstract type of the variable being printed can be different across different platforms. (Some sense is needed to ensure that the cast does not truncate the range of accessible values, of course, which is where [u]intmax_t comes in.) -Ben ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291639 - head/share/mk
Author: bdrewery Date: Wed Dec 2 05:23:12 2015 New Revision: 291639 URL: https://svnweb.freebsd.org/changeset/base/291639 Log: Add LIBNANDFS. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk Modified: head/share/mk/bsd.libnames.mk == --- head/share/mk/bsd.libnames.mk Wed Dec 2 02:47:13 2015 (r291638) +++ head/share/mk/bsd.libnames.mk Wed Dec 2 05:23:12 2015 (r291639) @@ -90,6 +90,7 @@ LIBMENU?= ${DESTDIR}${LIBDIR}/libmenu.a LIBMILTER?=${DESTDIR}${LIBDIR}/libmilter.a LIBMP?=${DESTDIR}${LIBDIR}/libmp.a LIBMT?=${DESTDIR}${LIBDIR}/libmt.a +LIBNANDFS?=${DESTDIR}${LIBDIR}/libnandfs.a LIBNCURSES?= ${DESTDIR}${LIBDIR}/libncurses.a LIBNCURSESW?= ${DESTDIR}${LIBDIR}/libncursesw.a LIBNETGRAPH?= ${DESTDIR}${LIBDIR}/libnetgraph.a ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r291640 - in head: lib/libnandfs sbin/nandfs sbin/newfs_nandfs targets/pseudo/userland targets/pseudo/userland/lib usr.sbin/nandsim usr.sbin/nandtool
Author: bdrewery Date: Wed Dec 2 05:31:01 2015 New Revision: 291640 URL: https://svnweb.freebsd.org/changeset/base/291640 Log: META MODE: Connect MK_NAND directories. Sponsored by: EMC / Isilon Storage Division Added: head/lib/libnandfs/Makefile.depend (contents, props changed) head/sbin/nandfs/Makefile.depend (contents, props changed) head/sbin/newfs_nandfs/Makefile.depend (contents, props changed) head/usr.sbin/nandsim/Makefile.depend (contents, props changed) head/usr.sbin/nandtool/Makefile.depend (contents, props changed) Modified: head/targets/pseudo/userland/Makefile.depend head/targets/pseudo/userland/lib/Makefile.depend Added: head/lib/libnandfs/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libnandfs/Makefile.depend Wed Dec 2 05:31:01 2015 (r291640) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/sbin/nandfs/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/nandfs/Makefile.dependWed Dec 2 05:31:01 2015 (r291640) @@ -0,0 +1,19 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libnandfs \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/sbin/newfs_nandfs/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sbin/newfs_nandfs/Makefile.depend Wed Dec 2 05:31:01 2015 (r291640) @@ -0,0 +1,21 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libexpat \ + lib/libgeom \ + lib/libsbuf \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Modified: head/targets/pseudo/userland/Makefile.depend == --- head/targets/pseudo/userland/Makefile.dependWed Dec 2 05:23:12 2015(r291639) +++ head/targets/pseudo/userland/Makefile.dependWed Dec 2 05:31:01 2015(r291640) @@ -800,6 +800,15 @@ DIRDEPS+= \ ${DEP_RELDIR}/secure \ ${DEP_RELDIR}/share \ +.if ${MK_NAND} != "no" +DIRDEPS+= \ + sbin/nandfs \ + sbin/newfs_nandfs \ + usr.sbin/nandsim \ + usr.sbin/nandtool \ + +.endif + DIRDEPS.amd64= \ sbin/bsdlabel \ sbin/fdisk \ Modified: head/targets/pseudo/userland/lib/Makefile.depend == --- head/targets/pseudo/userland/lib/Makefile.dependWed Dec 2 05:23:12 2015(r291639) +++ head/targets/pseudo/userland/lib/Makefile.dependWed Dec 2 05:31:01 2015(r291640) @@ -180,4 +180,8 @@ DIRDEPS+= \ .endif +.if ${MK_NAND} != "no" +DIRDEPS+= lib/libnandfs +.endif + .include Added: head/usr.sbin/nandsim/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/nandsim/Makefile.depend Wed Dec 2 05:31:01 2015 (r291640) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/usr.sbin/nandtool/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/nandtool/Makefile.depend Wed Dec 2 05:31:01 2015 (r291640) @@ -0,0 +1,21 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + gnu/lib/csu \ + gnu/lib/libgcc \ + include \ + include/xlocale \ + lib/${CSU_DIR} \ + lib/libc \ + lib/libcompiler_rt \ + lib/libexpat \ + lib/libgeom \ + lib/libsbuf \ + + +.
svn commit: r291641 - head/sys/dev/arcmsr
Author: delphij Date: Wed Dec 2 05:35:04 2015 New Revision: 291641 URL: https://svnweb.freebsd.org/changeset/base/291641 Log: Update arcmsr(4) to 1.30.00.00 in order to add support of ARC-1203 SATA RAID controllers. Many thanks to Areca for continuing to support FreeBSD. Submitted by: 黃清隆 MFC after:2 weeks Modified: head/sys/dev/arcmsr/arcmsr.c head/sys/dev/arcmsr/arcmsr.h Modified: head/sys/dev/arcmsr/arcmsr.c == --- head/sys/dev/arcmsr/arcmsr.cWed Dec 2 05:31:01 2015 (r291640) +++ head/sys/dev/arcmsr/arcmsr.cWed Dec 2 05:35:04 2015 (r291641) @@ -76,6 +76,7 @@ ** 1.20.00.27 05/06/2013 Ching Huang Fixed out standing cmd full on ARC-12x4 ** 1.20.00.28 09/13/2013 Ching Huang Removed recursive mutex in arcmsr_abort_dr_ccbs ** 1.20.00.29 12/18/2013 Ching Huang Change simq allocation number, support ARC1883 +** 1.30.00.00 11/30/2015 Ching Huang Added support ARC1203 ** */ @@ -126,15 +127,15 @@ __FBSDID("$FreeBSD$"); ** */ #if __FreeBSD_version >= 55 -#include -#include -#include -#include -#include + #include + #include + #include + #include + #include #else -#include -#include -#include + #include + #include + #include #endif #if !defined(CAM_NEW_TRAN_CODE) && __FreeBSD_version >= 700025 @@ -147,7 +148,7 @@ __FBSDID("$FreeBSD$"); #define arcmsr_callout_init(a) callout_init(a); #endif -#define ARCMSR_DRIVER_VERSION "arcmsr version 1.20.00.29 2013-12-18" +#define ARCMSR_DRIVER_VERSION "arcmsr version 1.30.00.00 2015-11-30" #include /* ** @@ -181,8 +182,8 @@ static int arcmsr_iop_message_xfer(struc static int arcmsr_resume(device_t dev); static int arcmsr_suspend(device_t dev); static void arcmsr_rescanLun_cb(struct cam_periph *periph, union ccb *ccb); -static voidarcmsr_polling_devmap(void *arg); -static voidarcmsr_srb_timeout(void *arg); +static void arcmsr_polling_devmap(void *arg); +static void arcmsr_srb_timeout(void *arg); static void arcmsr_hbd_postqueue_isr(struct AdapterControlBlock *acb); #ifdef ARCMSR_DEBUG1 static void arcmsr_dump_data(struct AdapterControlBlock *acb); @@ -220,11 +221,11 @@ static device_method_t arcmsr_methods[]= { 0, 0 } #endif }; - + static driver_t arcmsr_driver={ "arcmsr", arcmsr_methods, sizeof(struct AdapterControlBlock) }; - + static devclass_t arcmsr_devclass; DRIVER_MODULE(arcmsr, pci, arcmsr_driver, arcmsr_devclass, 0, 0); MODULE_DEPEND(arcmsr, pci, 1, 1, 1); @@ -247,38 +248,38 @@ static struct cdevsw arcmsr_cdevsw={ }; #else #define ARCMSR_CDEV_MAJOR 180 - + static struct cdevsw arcmsr_cdevsw = { - arcmsr_open,/* open */ - arcmsr_close, /* close*/ - noread, /* read */ - nowrite,/* write*/ - arcmsr_ioctl, /* ioctl*/ - nopoll, /* poll */ - nommap, /* mmap */ - nostrategy, /* strategy */ - "arcmsr", /* name */ - ARCMSR_CDEV_MAJOR, /* major*/ - nodump, /* dump */ - nopsize,/* psize*/ - 0 /* flags*/ + arcmsr_open,/* open */ + arcmsr_close, /* close*/ + noread, /* read */ + nowrite,/* write*/ + arcmsr_ioctl, /* ioctl*/ + nopoll, /* poll */ + nommap, /* mmap */ + nostrategy, /* strategy */ + "arcmsr", /* name */ + ARCMSR_CDEV_MAJOR, /* major*/ + nodump, /* dump */ + nopsize,/* psize*/ + 0 /* flags*/ }; #endif /*
svn commit: r291642 - in head/sys: conf contrib/dev/ath/ath_hal/ar9300 modules/ath
Author: adrian Date: Wed Dec 2 05:36:45 2015 New Revision: 291642 URL: https://svnweb.freebsd.org/changeset/base/291642 Log: Add initial ar9300 HAL support for the spectral scan mode. Modified: head/sys/conf/files head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c head/sys/modules/ath/Makefile Modified: head/sys/conf/files == --- head/sys/conf/files Wed Dec 2 05:35:04 2015(r291641) +++ head/sys/conf/files Wed Dec 2 05:36:45 2015(r291642) @@ -1058,6 +1058,8 @@ contrib/dev/ath/ath_hal/ar9300/ar9300_st compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" +contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c optional ath_hal | ath_ar9300 \ + compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_timer.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c optional ath_hal | ath_ar9300 \ Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.cWed Dec 2 05:35:04 2015(r291641) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.cWed Dec 2 05:36:45 2015(r291642) @@ -224,6 +224,14 @@ ar9300_attach_freebsd_ops(struct ath_hal ah->ah_isFastClockEnabled = ar9300_is_fast_clock_enabled; ah->ah_get11nExtBusy= ar9300_get_11n_ext_busy; + /* Spectral Scan Functions */ + ah->ah_spectralConfigure= ar9300_configure_spectral_scan; + ah->ah_spectralGetConfig= ar9300_get_spectral_params; + ah->ah_spectralStart= ar9300_start_spectral_scan; + ah->ah_spectralStop = ar9300_stop_spectral_scan; + ah->ah_spectralIsEnabled= ar9300_is_spectral_enabled; + ah->ah_spectralIsActive = ar9300_is_spectral_active; + /* Key cache functions */ ah->ah_getKeyCacheSize = ar9300_get_key_cache_size; ah->ah_resetKeyCacheEntry = ar9300_reset_key_cache_entry; Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.h == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.hWed Dec 2 05:35:04 2015(r291641) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd_inc.hWed Dec 2 05:36:45 2015(r291642) @@ -17,7 +17,7 @@ #define ATH_ANT_DIV_COMB1 /* Antenna combining */ #define ATH_SUPPORT_RAW_ADC_CAPTURE 0 /* Raw ADC capture support */ #define ATH_TRAFFIC_FAST_RECOVER0 /* XXX not sure yet */ -#define ATH_SUPPORT_SPECTRAL0 /* Spectral scan support */ +#define ATH_SUPPORT_SPECTRAL1 /* Spectral scan support */ #define ATH_BT_COEX 1 /* Enable BT Coex code */ #define ATH_PCIE_ERROR_MONITOR 0 /* ??? */ #define ATH_SUPPORT_CRDC0 /* ??? */ Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c == --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c Wed Dec 2 05:35:04 2015(r291641) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c Wed Dec 2 05:36:45 2015(r291642) @@ -15,12 +15,14 @@ */ #include "opt_ah.h" -#ifdef AH_SUPPORT_AR9300 +//#ifdef AH_SUPPORT_AR9300 #include "ah.h" #include "ah_desc.h" #include "ah_internal.h" +#include "ar9300_freebsd_inc.h" + #include "ar9300/ar9300phy.h" #include "ar9300/ar9300.h" #include "ar9300/ar9300reg.h" @@ -310,7 +312,7 @@ ar9300_configure_spectral_scan(struct at u_int32_t val, i; struct ath_hal_9300 *ahp = AH9300(ah); HAL_BOOL asleep = ahp->ah_chip_full_sleep; -int16_t nf_buf[NUM_NF_READINGS]; +int16_t nf_buf[HAL_NUM_NF_READINGS]; if ((AR_SREV_WASP(ah) || AR_SREV_SCORPION(ah)) && asleep) { ar9300_set_power_mode(ah, HAL_PM_AWAKE, AH_TRUE); @@ -319,7 +321,7 @@ ar9300_configure_spectral_scan(struct at ar9300_prep_spectral_scan(ah); if (ss->ss_spectral_pri) { -for (i = 0; i < NUM_NF_READINGS; i++) { +for (i = 0; i < HAL_NUM_NF_READINGS; i++) { nf_buf[i] = NOISE_PWR_DBM_2_INT(ss->ss_nf_cal[i]); } ar9300_load_nf(ah, nf_buf); @@ -392,11 +394,17 @@ void ar9300_get_spectra