From owner-p4-projects@FreeBSD.ORG Sun Mar 16 00:00:40 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4BA99106566C; Sun, 16 Mar 2008 00:00:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AD48106566B for ; Sun, 16 Mar 2008 00:00:40 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0B06F8FC14 for ; Sun, 16 Mar 2008 00:00:40 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2G00dEF093039 for ; Sun, 16 Mar 2008 00:00:39 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2G00dJq093037 for perforce@freebsd.org; Sun, 16 Mar 2008 00:00:39 GMT (envelope-from marcel@freebsd.org) Date: Sun, 16 Mar 2008 00:00:39 GMT Message-Id: <200803160000.m2G00dJq093037@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 137814 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 00:00:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=137814 Change 137814 by marcel@marcel_xcllnt on 2008/03/15 23:59:52 Handle decrementer. Handle openpic. call sched_throw(). Affected files ... .. //depot/projects/powerpc/sys/powerpc/aim/clock.c#2 edit .. //depot/projects/powerpc/sys/powerpc/aim/mp_cpudep.c#5 edit .. //depot/projects/powerpc/sys/powerpc/include/pcpu.h#12 edit .. //depot/projects/powerpc/sys/powerpc/powerpc/mp_machdep.c#20 edit .. //depot/projects/powerpc/sys/powerpc/powerpc/openpic.c#9 edit Differences ... ==== //depot/projects/powerpc/sys/powerpc/aim/clock.c#2 (text+ko) ==== @@ -61,11 +61,12 @@ #include #include #include -#include #include #include +#include +#include +#include #include -#include #include @@ -77,11 +78,9 @@ /* * Initially we assume a processor with a bus frequency of 12.5 MHz. */ -u_int tickspending; u_long ns_per_tick = 80; static u_long ticks_per_sec = 12500000; static long ticks_per_intr; -static volatile u_long lasttb; #define DIFF19041970 2082844800 @@ -164,7 +163,6 @@ void decr_intr(struct trapframe *frame) { - u_long tb; long tick; int nticks; @@ -178,36 +176,17 @@ * Based on the actual time delay since the last decrementer reload, * we arrange for earlier interrupt next time. */ - __asm ("mftb %0; mfdec %1" : "=r"(tb), "=r"(tick)); + __asm ("mfdec %0" : "=r"(tick)); for (nticks = 0; tick < 0; nticks++) tick += ticks_per_intr; mtdec(tick); - /* - * lasttb is used during microtime. Set it to the virtual - * start of this tick interval. - */ - lasttb = tb + tick - ticks_per_intr; - nticks += tickspending; - tickspending = 0; - - /* - * Reenable interrupts - */ -#if 0 - msr = mfmsr(); - mtmsr(msr | PSL_EE | PSL_RI); -#endif - /* - * Do standard timer interrupt stuff. - * Do softclock stuff only on the last iteration. - */ -#if 0 - while (--nticks > 0) { - hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + while (nticks-- > 0) { + if (PCPU_GET(cpuid) == 0) + hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + else + hardclock_cpu(TRAPF_USERMODE(frame)); } -#endif - hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); } void @@ -235,7 +214,6 @@ ns_per_tick = 1000000000 / ticks_per_sec; ticks_per_intr = ticks_per_sec / hz; - __asm __volatile ("mftb %0" : "=r"(lasttb)); mtdec(ticks_per_intr); mtmsr(msr); ==== //depot/projects/powerpc/sys/powerpc/aim/mp_cpudep.c#5 (text+ko) ==== @@ -135,18 +135,6 @@ return (powerpc_smp_fill_cpuref(cpuref, bsp)); } -#if 0 -static void -dump_rstvec(void) -{ - uint32_t buf[6]; - - bcopy((void *)EXC_RST, buf, sizeof(buf)); - printf("XXX: %08x %08x %08x %08x %08x %08x\n", buf[0], buf[1], buf[2], - buf[3], buf[4], buf[5]); -} -#endif - uint32_t cpudep_ap_bootstrap(volatile uint32_t *trcp) { ==== //depot/projects/powerpc/sys/powerpc/include/pcpu.h#12 (text+ko) ==== @@ -41,6 +41,7 @@ struct pmap *pc_curpmap; /* current pmap */ \ struct thread *pc_fputhread; /* current fpu user */ \ uintptr_t pc_hwref; \ + uint32_t pc_pir; \ int pc_bsp:1; \ int pc_awake:1; \ uint32_t pc_ipimask; \ ==== //depot/projects/powerpc/sys/powerpc/powerpc/mp_machdep.c#20 (text+ko) ==== @@ -33,6 +33,8 @@ #include #include #include +#include +#include #include #include @@ -45,7 +47,8 @@ MALLOC_DEFINE(M_SMP, "smp", "SMP specific datastructures"); volatile static int ap_awake; -volatile static int ap_spin; +volatile static u_int ap_state; +volatile static uint32_t ap_decr; int mp_ipi_test = 0; @@ -56,14 +59,19 @@ trcp[0] = 0x3000; trcp[1] = (uint32_t)&machdep_ap_bootstrap; + __asm __volatile("mtspr 1023,%0" :: "r"(PCPU_GET(cpuid))); + __asm __volatile("mfspr %0,1023" : "=r"(pcpup->pc_pir)); pcpup->pc_awake = 1; - while (ap_spin) - DELAY(0); + while (ap_state == 0) + ; + + __asm __volatile("mtdec %0" :: "r"(ap_decr)); ap_awake++; - while (1); + mtmsr(mfmsr() | PSL_EE | PSL_RI); + sched_throw(NULL); } struct cpu_group * @@ -135,10 +143,12 @@ pcpu_init(pc, cpu.cr_cpuid, sizeof(*pc)); } else { pc = pcpup; + pc->pc_cpuid = bsp.cr_cpuid; pc->pc_bsp = 1; } + pc->pc_cpumask = 1 << pc->pc_cpuid; pc->pc_hwref = cpu.cr_hwref; - all_cpus |= 1 << cpu.cr_cpuid; + all_cpus |= pc->pc_cpumask; next: error = powerpc_smp_next_cpu(&cpu); @@ -176,28 +186,29 @@ return; } - ap_spin = 1; - cpus = 0; smp_cpus = 0; SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { cpus++; + pc->pc_other_cpus = all_cpus & ~pc->pc_cpumask; if (!pc->pc_bsp) { printf("Waking up CPU %d (dev=%x)\n", pc->pc_cpuid, pc->pc_hwref); powerpc_smp_start_cpu(pc); - } else + } else { + __asm __volatile("mfspr %0,1023" : "=r"(pc->pc_pir)); pc->pc_awake = 1; - + } if (pc->pc_awake) smp_cpus++; } ap_awake = 1; - ap_spin = 0; + __asm __volatile("mfdec %0" : "=r"(ap_decr)); + ap_state++; while (ap_awake < smp_cpus) - DELAY(0); + ; if (smp_cpus != cpus || cpus != mp_ncpus) { printf("SMP: %d CPUs found; %d CPUs usable; %d CPUs woken\n", @@ -229,7 +240,7 @@ case IPI_AST: break; case IPI_PREEMPT: - /* TBD */ + sched_preempt(curthread); break; case IPI_RENDEZVOUS: smp_rendezvous_action(); ==== //depot/projects/powerpc/sys/powerpc/powerpc/openpic.c#9 (text+ko) ==== @@ -82,7 +82,7 @@ openpic_attach(device_t dev) { struct openpic_softc *sc; - u_int ipi, irq; + u_int cpu, ipi, irq; u_int32_t x; sc = device_get_softc(dev); @@ -132,6 +132,11 @@ "Version %s, supports %d CPUs and %d irqs\n", sc->sc_version, sc->sc_ncpu, sc->sc_nirq); + for (cpu = 0; cpu < sc->sc_ncpu; cpu++) { + openpic_write(sc, OPENPIC_PCPU_TPR(cpu), 0); + openpic_write(sc, OPENPIC_PCPU_WHOAMI(cpu), cpu); + } + /* Reset and disable all interrupts. */ for (irq = 0; irq < sc->sc_nirq; irq++) { x = irq; /* irq == vector. */ @@ -150,8 +155,6 @@ openpic_write(sc, OPENPIC_IPI_VECTOR(ipi), x); } - openpic_set_priority(sc, 15); - /* we don't need 8259 passthrough mode */ x = openpic_read(sc, OPENPIC_CONFIG); x |= OPENPIC_CONFIG_8259_PASSTHRU_DISABLE; @@ -161,9 +164,10 @@ for (irq = 0; irq < sc->sc_nirq; irq++) openpic_write(sc, OPENPIC_IDEST(irq), 1 << 0); - /* XXX set spurious intr vector */ - - openpic_set_priority(sc, 0); + for (cpu = 0; cpu < sc->sc_ncpu; cpu++) { + openpic_write(sc, OPENPIC_PCPU_TPR(cpu), 0); + openpic_write(sc, OPENPIC_PCPU_WHOAMI(cpu), cpu); + } /* clear all pending interrupts */ for (irq = 0; irq < sc->sc_nirq; irq++) { From owner-p4-projects@FreeBSD.ORG Sun Mar 16 01:29:19 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 278631065670; Sun, 16 Mar 2008 01:29:19 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0CD0106564A for ; Sun, 16 Mar 2008 01:29:18 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BC2688FC19 for ; Sun, 16 Mar 2008 01:29:18 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2G1TIBi008391 for ; Sun, 16 Mar 2008 01:29:18 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2G1TIlk008389 for perforce@freebsd.org; Sun, 16 Mar 2008 01:29:18 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 01:29:18 GMT Message-Id: <200803160129.m2G1TIlk008389@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137816 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 01:29:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=137816 Change 137816 by sam@sam_ebb on 2008/03/16 01:29:06 implement protection (need to add raw xmit path still) Obtained from: openbsd (loosely) MFP4 after: 2 weeks Affected files ... .. //depot/projects/vap/sys/dev/usb/if_ural.c#14 edit Differences ... ==== //depot/projects/vap/sys/dev/usb/if_ural.c#14 (text+ko) ==== @@ -1316,6 +1316,71 @@ } static int +ural_sendprot(struct ural_softc *sc, + const struct mbuf *m, struct ieee80211_node *ni, int prot, int rate) +{ + struct ieee80211com *ic = ni->ni_ic; + const struct ieee80211_frame *wh; + struct ural_tx_desc *desc; + struct ural_tx_data *data; + struct mbuf *mprot; + int protrate, ackrate, pktlen, flags; + uint16_t dur; + usbd_status error; + + KASSERT(prot == IEEE80211_PROT_RTSCTS || prot == IEEE80211_PROT_CTSONLY, + ("protection %d", prot)); + + wh = mtod(m, const struct ieee80211_frame *); + pktlen = m->m_pkthdr.len + IEEE80211_CRC_LEN; + + /* XXX use phy support */ + protrate = 2; + ackrate = ural_ack_rate(ic, rate); + + dur = ural_txtime(pktlen, rate, ic->ic_flags) + + ural_txtime(RAL_ACK_SIZE, ackrate, ic->ic_flags) + + 2 * RAL_SIFS; + flags = RAL_TX_RETRY(7); + if (prot == IEEE80211_PROT_RTSCTS) { + dur += ural_txtime(RAL_CTS_SIZE, + ural_ack_rate(ic, protrate), ic->ic_flags) + RAL_SIFS; + flags |= RAL_TX_ACK; + mprot = ieee80211_alloc_rts(ic, wh->i_addr1, wh->i_addr2, dur); + } else { + mprot = ieee80211_alloc_cts(ic, ni->ni_vap->iv_myaddr, dur); + } + if (mprot == NULL) { + /* XXX stat + msg */ + return ENOBUFS; + } + data = &sc->tx_data[sc->tx_cur]; + desc = (struct ural_tx_desc *)data->buf; + + data->m = mprot; + data->ni = ieee80211_ref_node(ni); + m_copydata(mprot, 0, mprot->m_pkthdr.len, data->buf + RAL_TX_DESC_SIZE); + ural_setup_tx_desc(sc, desc, flags, mprot->m_pkthdr.len, protrate); + + usbd_setup_xfer(data->xfer, sc->sc_tx_pipeh, data, data->buf, + /* NB: no roundup necessary */ + RAL_TX_DESC_SIZE + mprot->m_pkthdr.len, + USBD_FORCE_SHORT_XFER | USBD_NO_COPY, RAL_TX_TIMEOUT, ural_txeof); + + error = usbd_transfer(data->xfer); + if (error != USBD_NORMAL_COMPLETION && error != USBD_IN_PROGRESS) { + data->m = NULL; + data->ni = NULL; + return error; + } + + sc->tx_queued++; + sc->tx_cur = (sc->tx_cur + 1) % RAL_TX_LIST_COUNT; + + return 0; +} + +static int ural_tx_raw(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni, const struct ieee80211_bpf_params *params) { @@ -1338,6 +1403,7 @@ m_freem(m0); return EINVAL; } + /* XXX honor protection */ if (bpf_peers_present(ifp->if_bpf)) { struct ural_tx_radiotap_header *tap = &sc->sc_txtap; @@ -1429,6 +1495,23 @@ wh = mtod(m0, struct ieee80211_frame *); } + if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { + int prot = IEEE80211_PROT_NONE; + if (m0->m_pkthdr.len + IEEE80211_CRC_LEN > vap->iv_rtsthreshold) + prot = IEEE80211_PROT_RTSCTS; + else if ((ic->ic_flags & IEEE80211_F_USEPROT) && + RAL_RATE_IS_OFDM(rate)) + prot = ic->ic_protmode; + if (prot != IEEE80211_PROT_NONE) { + error = ural_sendprot(sc, m0, ni, prot, rate); + if (error) { + m_freem(m0); + return error; + } + flags |= RAL_TX_IFS_SIFS; + } + } + data = &sc->tx_data[sc->tx_cur]; desc = (struct ural_tx_desc *)data->buf; From owner-p4-projects@FreeBSD.ORG Sun Mar 16 02:31:26 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EFD101065674; Sun, 16 Mar 2008 02:31:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADAD1106564A for ; Sun, 16 Mar 2008 02:31:25 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id ACF8D8FC15 for ; Sun, 16 Mar 2008 02:31:25 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2G2VPHl011772 for ; Sun, 16 Mar 2008 02:31:25 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2G2VO4B011770 for perforce@freebsd.org; Sun, 16 Mar 2008 02:31:24 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 02:31:24 GMT Message-Id: <200803160231.m2G2VO4B011770@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137817 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 02:31:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=137817 Change 137817 by sam@sam_ebb on 2008/03/16 02:30:50 add routines to alloc+build rts and cts frames; inspired by similar routines in openbsd Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_output.c#39 edit .. //depot/projects/vap/sys/net80211/ieee80211_proto.h#18 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_output.c#39 (text+ko) ==== @@ -543,7 +543,7 @@ return EIO; /* XXX */ } - MGETHDR(m, M_NOWAIT, MT_HEADER); + m = m_gethdr(M_NOWAIT, MT_HEADER); if (m == NULL) { /* XXX debug msg */ ieee80211_unref_node(&ni); @@ -2246,6 +2246,59 @@ return ic->ic_raw_xmit(bss, m, NULL); } +/* + * Allocate and build a RTS (Request To Send) control frame. + */ +struct mbuf * +ieee80211_alloc_rts(struct ieee80211com *ic, + const uint8_t ra[IEEE80211_ADDR_LEN], + const uint8_t ta[IEEE80211_ADDR_LEN], + uint16_t dur) +{ + struct ieee80211_frame_rts *rts; + struct mbuf *m; + + /* XXX honor ic_headroom */ + m = m_gethdr(M_DONTWAIT, MT_DATA); + if (m != NULL) { + rts = mtod(m, struct ieee80211_frame_rts *); + rts->i_fc[0] = IEEE80211_FC0_VERSION_0 | + IEEE80211_FC0_TYPE_CTL | IEEE80211_FC0_SUBTYPE_RTS; + rts->i_fc[1] = IEEE80211_FC1_DIR_NODS; + *(u_int16_t *)rts->i_dur = htole16(dur); + IEEE80211_ADDR_COPY(rts->i_ra, ra); + IEEE80211_ADDR_COPY(rts->i_ta, ta); + + m->m_pkthdr.len = m->m_len = sizeof(struct ieee80211_frame_rts); + } + return m; +} + +/* + * Allocate and build a CTS (Clear To Send) control frame. + */ +struct mbuf * +ieee80211_alloc_cts(struct ieee80211com *ic, + const uint8_t ra[IEEE80211_ADDR_LEN], uint16_t dur) +{ + struct ieee80211_frame_cts *cts; + struct mbuf *m; + + /* XXX honor ic_headroom */ + m = m_gethdr(M_DONTWAIT, MT_DATA); + if (m != NULL) { + cts = mtod(m, struct ieee80211_frame_cts *); + cts->i_fc[0] = IEEE80211_FC0_VERSION_0 | + IEEE80211_FC0_TYPE_CTL | IEEE80211_FC0_SUBTYPE_CTS; + cts->i_fc[1] = IEEE80211_FC1_DIR_NODS; + *(u_int16_t *)cts->i_dur = htole16(dur); + IEEE80211_ADDR_COPY(cts->i_ra, ra); + + m->m_pkthdr.len = m->m_len = sizeof(struct ieee80211_frame_cts); + } + return m; +} + static void ieee80211_tx_mgt_timeout(void *arg) { ==== //depot/projects/vap/sys/net80211/ieee80211_proto.h#18 (text+ko) ==== @@ -91,6 +91,11 @@ struct mbuf *ieee80211_alloc_proberesp(struct ieee80211_node *, int); int ieee80211_send_proberesp(struct ieee80211vap *, const uint8_t da[IEEE80211_ADDR_LEN], int); +struct mbuf *ieee80211_alloc_rts(struct ieee80211com *ic, + const uint8_t [IEEE80211_ADDR_LEN], + const uint8_t [IEEE80211_ADDR_LEN], uint16_t); +struct mbuf *ieee80211_alloc_cts(struct ieee80211com *, + const uint8_t [IEEE80211_ADDR_LEN], uint16_t); void ieee80211_reset_erp(struct ieee80211com *); void ieee80211_set_shortslottime(struct ieee80211com *, int onoff); From owner-p4-projects@FreeBSD.ORG Sun Mar 16 02:31:27 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 642CF1065697; Sun, 16 Mar 2008 02:31:26 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D10FA1065672 for ; Sun, 16 Mar 2008 02:31:25 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D09F48FC16 for ; Sun, 16 Mar 2008 02:31:25 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2G2VPP0011777 for ; Sun, 16 Mar 2008 02:31:25 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2G2VPqB011775 for perforce@freebsd.org; Sun, 16 Mar 2008 02:31:25 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 02:31:25 GMT Message-Id: <200803160231.m2G2VPqB011775@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137818 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 02:31:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=137818 Change 137818 by sam@sam_ebb on 2008/03/16 02:31:21 expose if_purgemaddrs for net80211 use Affected files ... .. //depot/projects/vap/sys/net/if.c#8 edit .. //depot/projects/vap/sys/net/if_var.h#7 edit Differences ... ==== //depot/projects/vap/sys/net/if.c#8 (text+ko) ==== @@ -107,7 +107,6 @@ */ static void if_attachdomain(void *); static void if_attachdomain1(struct ifnet *); -static void if_purgemaddrs(struct ifnet *); static int ifconf(u_long, caddr_t); static void if_freemulti(struct ifmultiaddr *); static void if_grow(void); @@ -644,7 +643,7 @@ /* * Remove any multicast network addresses from an interface. */ -static void +void if_purgemaddrs(struct ifnet *ifp) { struct ifmultiaddr *ifma; ==== //depot/projects/vap/sys/net/if_var.h#7 (text+ko) ==== @@ -669,6 +669,7 @@ void if_delmulti_ifma(struct ifmultiaddr *); void if_detach(struct ifnet *); void if_purgeaddrs(struct ifnet *); +void if_purgemaddrs(struct ifnet *); void if_down(struct ifnet *); struct ifmultiaddr * if_findmulti(struct ifnet *, struct sockaddr *); From owner-p4-projects@FreeBSD.ORG Sun Mar 16 02:59:55 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4746A1065670; Sun, 16 Mar 2008 02:59:55 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 055771065676 for ; Sun, 16 Mar 2008 02:59:55 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 04D2B8FC1A for ; Sun, 16 Mar 2008 02:59:55 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2G2xsBb012593 for ; Sun, 16 Mar 2008 02:59:54 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2G2xsXh012591 for perforce@freebsd.org; Sun, 16 Mar 2008 02:59:54 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 02:59:54 GMT Message-Id: <200803160259.m2G2xsXh012591@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137820 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 02:59:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=137820 Change 137820 by sam@sam_ebb on 2008/03/16 02:59:46 must check if cb hook is setup Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_amrr.c#8 edit .. //depot/projects/vap/sys/net80211/ieee80211_proto.c#25 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_amrr.c#8 (text+ko) ==== @@ -172,7 +172,7 @@ struct ieee80211_amrr *amrr = amn->amn_amrr; int rix; - if (is_enough(amn) && ticks - amn->amn_ticks > amrr->amrr_interval) { + if (is_enough(amn) && (ticks - amn->amn_ticks) > amrr->amrr_interval) { rix = amrr_update(amrr, amn, ni); if (rix != amn->amn_rix) { /* update public rate */ @@ -180,6 +180,7 @@ ni->ni_rates.rs_rates[rix] & IEEE80211_RATE_VAL; amn->amn_rix = rix; } + amn->amn_ticks = ticks; } else rix = amn->amn_rix; return rix; ==== //depot/projects/vap/sys/net80211/ieee80211_proto.c#25 (text+ko) ==== @@ -1681,7 +1681,7 @@ vap->iv_newstate_cb = ieee80211_newstate_cb; } rc = vap->iv_newstate(vap, nstate, arg); - if (rc == 0) + if (rc == 0 && vap->iv_newstate_cb != NULL) vap->iv_newstate_cb(vap, nstate, arg); done: return rc; From owner-p4-projects@FreeBSD.ORG Sun Mar 16 03:01:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E90091065675; Sun, 16 Mar 2008 03:01:57 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BE61106564A for ; Sun, 16 Mar 2008 03:01:57 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 82B528FC17 for ; Sun, 16 Mar 2008 03:01:57 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2G31vfw012829 for ; Sun, 16 Mar 2008 03:01:57 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2G31vGE012827 for perforce@freebsd.org; Sun, 16 Mar 2008 03:01:57 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 03:01:57 GMT Message-Id: <200803160301.m2G31vGE012827@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137821 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 03:01:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=137821 Change 137821 by sam@sam_ebb on 2008/03/16 03:01:10 forced commit to note last change corrected time-based updates; wasn't updating the tick time of the last rate control update Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_amrr.c#9 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_amrr.c#9 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Sun Mar 16 03:10:49 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A8AED1065675; Sun, 16 Mar 2008 03:10:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 657A11065672; Sun, 16 Mar 2008 03:10:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1FD078FC1A; Sun, 16 Mar 2008 03:10:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m2G39dlC031155; Sat, 15 Mar 2008 21:09:39 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 15 Mar 2008 21:10:14 -0600 (MDT) Message-Id: <20080315.211014.-1303466449.imp@bsdimp.com> To: rrs@freebsd.org From: "M. Warner Losh" In-Reply-To: <200803131744.m2DHi57M087677@repoman.freebsd.org> References: <200803131744.m2DHi57M087677@repoman.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: perforce@freebsd.org Subject: Re: PERFORCE change 137623 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 03:10:50 -0000 You might put some CTASSERTs in to make sure that we're divisible by 16 for these defines. Warner From owner-p4-projects@FreeBSD.ORG Sun Mar 16 03:13:44 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 288D51065670; Sun, 16 Mar 2008 03:13:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA8A5106564A; Sun, 16 Mar 2008 03:13:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id ADDF18FC14; Sun, 16 Mar 2008 03:13:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m2G3AMBH031168; Sat, 15 Mar 2008 21:10:22 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 15 Mar 2008 21:10:57 -0600 (MDT) Message-Id: <20080315.211057.420517080.imp@bsdimp.com> To: rrs@freebsd.org From: "M. Warner Losh" In-Reply-To: <200803131750.m2DHoDj9087965@repoman.freebsd.org> References: <200803131750.m2DHoDj9087965@repoman.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: perforce@freebsd.org Subject: Re: PERFORCE change 137628 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 03:13:45 -0000 In message: <200803131750.m2DHoDj9087965@repoman.freebsd.org> "Randall R. Stewart" writes: : http://perforce.freebsd.org/chv.cgi?CH=137628 : : Change 137628 by rrs@rrs-mips2-jnpr on 2008/03/13 17:49:36 : : Get opt_global.h in so we can pick up SOFTFLOAT This change is a nop. opt_global.h is included by all files automatically. Warner : Affected files ... : : .. //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#16 edit : : Differences ... : : ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/trap.c#16 (text+ko) ==== : : @@ -42,6 +42,7 @@ : __FBSDID("$FreeBSD$"); : : #include "opt_ddb.h" : +#include "opt_global.h" : : #define NO_REG_DEFS 1 /* Prevent asm.h from including regdef.h */ : #include : From owner-p4-projects@FreeBSD.ORG Sun Mar 16 03:52:54 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1CB021065673; Sun, 16 Mar 2008 03:52:54 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D03BB106564A for ; Sun, 16 Mar 2008 03:52:53 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CEF958FC16 for ; Sun, 16 Mar 2008 03:52:53 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2G3qrdZ017252 for ; Sun, 16 Mar 2008 03:52:53 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2G3qr9X017250 for perforce@freebsd.org; Sun, 16 Mar 2008 03:52:53 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 03:52:53 GMT Message-Id: <200803160352.m2G3qr9X017250@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137823 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 03:52:54 -0000 http://perforce.freebsd.org/chv.cgi?CH=137823 Change 137823 by sam@sam_ebb on 2008/03/16 03:52:37 must call iv_reset before checking ENETRESET so the default method can return it and force the legacy path Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#44 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#44 (text+ko) ==== @@ -3311,14 +3311,14 @@ * reload of the hardware state but not a complete re-init; * in that case we use the iv_reset callback. If a device * does not fillin iv_reset then it defaults to one that - * calls the init method--which may be suboptimal. + * returns ENETRESET--which may be suboptimal. */ + if (error == ERESTART) + error = IFNET_IS_UP_RUNNING(ifp) ? vap->iv_reset(vap, cmd) : 0; if (error == ENETRESET) { if (IFNET_IS_UP_RUNNING(ifp)) ieee80211_init(vap); error = 0; - } else if (error == ERESTART) { - error = IFNET_IS_UP_RUNNING(ifp) ? vap->iv_reset(vap, cmd) : 0; } return error; } From owner-p4-projects@FreeBSD.ORG Sun Mar 16 06:20:42 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 31D8D1065672; Sun, 16 Mar 2008 06:20:42 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDFA51065670 for ; Sun, 16 Mar 2008 06:20:41 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C4C448FC12 for ; Sun, 16 Mar 2008 06:20:41 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2G6Kfp9034690 for ; Sun, 16 Mar 2008 06:20:41 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2G6KcPj034688 for perforce@freebsd.org; Sun, 16 Mar 2008 06:20:38 GMT (envelope-from imp@freebsd.org) Date: Sun, 16 Mar 2008 06:20:38 GMT Message-Id: <200803160620.m2G6KcPj034688@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 137825 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 06:20:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=137825 Change 137825 by imp@imp_lighthouse on 2008/03/16 06:20:15 First cut at customization for the SLUG: a kernel config file. Affected files ... .. //depot/projects/arm/src/sys/arm/conf/SLUG#1 add .. //depot/projects/arm/src/sys/arm/conf/SLUG.hints#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Sun Mar 16 16:15:09 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A21A21065677; Sun, 16 Mar 2008 16:15:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 617AA1065675 for ; Sun, 16 Mar 2008 16:15:08 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 533998FC1D for ; Sun, 16 Mar 2008 16:15:08 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GGF8Wf088362 for ; Sun, 16 Mar 2008 16:15:08 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GGF89o088360 for perforce@freebsd.org; Sun, 16 Mar 2008 16:15:08 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 16:15:08 GMT Message-Id: <200803161615.m2GGF89o088360@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137838 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 16:15:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=137838 Change 137838 by sam@sam_ebb on 2008/03/16 16:14:30 honor protection in the raw xmit path Affected files ... .. //depot/projects/vap/sys/dev/usb/if_ural.c#15 edit Differences ... ==== //depot/projects/vap/sys/dev/usb/if_ural.c#15 (text+ko) ==== @@ -1403,7 +1403,20 @@ m_freem(m0); return EINVAL; } - /* XXX honor protection */ + flags = 0; + if ((params->ibp_flags & IEEE80211_BPF_NOACK) == 0) + flags |= RAL_TX_ACK; + if (params->ibp_flags & (IEEE80211_BPF_RTS|IEEE80211_BPF_CTS)) { + error = ural_sendprot(sc, m0, ni, + params->ibp_flags & IEEE80211_BPF_RTS ? + IEEE80211_PROT_RTSCTS : IEEE80211_PROT_CTSONLY, + rate); + if (error) { + m_freem(m0); + return error; + } + flags |= RAL_TX_IFS_SIFS; + } if (bpf_peers_present(ifp->if_bpf)) { struct ural_tx_radiotap_header *tap = &sc->sc_txtap; @@ -1420,10 +1433,6 @@ data->m = m0; data->ni = ni; - flags = 0; - if ((params->ibp_flags & IEEE80211_BPF_NOACK) == 0) - flags |= RAL_TX_ACK; - m_copydata(m0, 0, m0->m_pkthdr.len, data->buf + RAL_TX_DESC_SIZE); /* XXX need to setup descriptor ourself */ ural_setup_tx_desc(sc, desc, flags, m0->m_pkthdr.len, rate); From owner-p4-projects@FreeBSD.ORG Sun Mar 16 16:28:22 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 841251065672; Sun, 16 Mar 2008 16:28:22 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 294A3106564A for ; Sun, 16 Mar 2008 16:28:22 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 338EC8FC1D for ; Sun, 16 Mar 2008 16:28:22 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GGSLml088921 for ; Sun, 16 Mar 2008 16:28:21 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GGSL3e088919 for perforce@freebsd.org; Sun, 16 Mar 2008 16:28:21 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 16:28:21 GMT Message-Id: <200803161628.m2GGSL3e088919@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137840 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 16:28:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=137840 Change 137840 by sam@sam_ebb on 2008/03/16 16:28:21 o bump tx list count o add protection Note: untested until I can locate my awol rum card Affected files ... .. //depot/projects/vap/sys/dev/usb/if_rum.c#11 edit .. //depot/projects/vap/sys/dev/usb/if_rumvar.h#7 edit Differences ... ==== //depot/projects/vap/sys/dev/usb/if_rum.c#11 (text+ko) ==== @@ -632,7 +632,7 @@ struct rum_tx_data *data; int i, error; - sc->tx_queued = 0; + sc->tx_queued = sc->tx_cur = 0; for (i = 0; i < RUM_TX_LIST_COUNT; i++) { data = &sc->tx_data[i]; @@ -1126,6 +1126,71 @@ #define RUM_TX_TIMEOUT 5000 static int +rum_sendprot(struct rum_softc *sc, + const struct mbuf *m, struct ieee80211_node *ni, int prot, int rate) +{ + struct ieee80211com *ic = ni->ni_ic; + const struct ieee80211_frame *wh; + struct rum_tx_desc *desc; + struct rum_tx_data *data; + struct mbuf *mprot; + int protrate, ackrate, pktlen, flags; + uint16_t dur; + usbd_status error; + + KASSERT(prot == IEEE80211_PROT_RTSCTS || prot == IEEE80211_PROT_CTSONLY, + ("protection %d", prot)); + + wh = mtod(m, const struct ieee80211_frame *); + pktlen = m->m_pkthdr.len + IEEE80211_CRC_LEN; + + /* XXX use phy support */ + protrate = 2; + ackrate = rum_ack_rate(ic, rate); + + dur = rum_txtime(pktlen, rate, ic->ic_flags) + + rum_txtime(RUM_ACK_SIZE, ackrate, ic->ic_flags) + + 2 * sc->sifs; + flags = RT2573_TX_MORE_FRAG; + if (prot == IEEE80211_PROT_RTSCTS) { + dur += rum_txtime(RUM_CTS_SIZE, + rum_ack_rate(ic, protrate), ic->ic_flags) + sc->sifs; + flags |= RT2573_TX_NEED_ACK; + mprot = ieee80211_alloc_rts(ic, wh->i_addr1, wh->i_addr2, dur); + } else { + mprot = ieee80211_alloc_cts(ic, ni->ni_vap->iv_myaddr, dur); + } + if (mprot == NULL) { + /* XXX stat + msg */ + return ENOBUFS; + } + data = &sc->tx_data[sc->tx_cur]; + desc = (struct rum_tx_desc *)data->buf; + + data->m = mprot; + data->ni = ieee80211_ref_node(ni); + m_copydata(mprot, 0, mprot->m_pkthdr.len, data->buf + RT2573_TX_DESC_SIZE); + rum_setup_tx_desc(sc, desc, flags, 0, mprot->m_pkthdr.len, protrate); + + usbd_setup_xfer(data->xfer, sc->sc_tx_pipeh, data, data->buf, + /* NB: no roundup necessary */ + RT2573_TX_DESC_SIZE + mprot->m_pkthdr.len, + USBD_FORCE_SHORT_XFER | USBD_NO_COPY, RUM_TX_TIMEOUT, rum_txeof); + + error = usbd_transfer(data->xfer); + if (error != USBD_NORMAL_COMPLETION && error != USBD_IN_PROGRESS) { + data->m = NULL; + data->ni = NULL; + return error; + } + + sc->tx_queued++; + sc->tx_cur = (sc->tx_cur + 1) % RUM_TX_LIST_COUNT; + + return 0; +} + +static int rum_tx_mgt(struct rum_softc *sc, struct mbuf *m0, struct ieee80211_node *ni) { struct ieee80211vap *vap = ni->ni_vap; @@ -1212,6 +1277,7 @@ } sc->tx_queued++; + sc->tx_cur = (sc->tx_cur + 1) % RUM_TX_LIST_COUNT; return 0; } @@ -1233,15 +1299,26 @@ data = &sc->tx_data[0]; desc = (struct rum_tx_desc *)data->buf; - flags = 0; rate = params->ibp_rate0 & IEEE80211_RATE_VAL; /* XXX validate */ if (rate == 0) { m_freem(m0); return EINVAL; } + flags = 0; if ((params->ibp_flags & IEEE80211_BPF_NOACK) == 0) flags |= RT2573_TX_NEED_ACK; + if (params->ibp_flags & (IEEE80211_BPF_RTS|IEEE80211_BPF_CTS)) { + error = rum_sendprot(sc, m0, ni, + params->ibp_flags & IEEE80211_BPF_RTS ? + IEEE80211_PROT_RTSCTS : IEEE80211_PROT_CTSONLY, + rate); + if (error) { + m_freem(m0); + return error; + } + flags |= RT2573_TX_LONG_RETRY | RT2573_TX_IFS_SIFS; + } if (bpf_peers_present(ifp->if_bpf)) { struct rum_tx_radiotap_header *tap = &sc->sc_txtap; @@ -1284,6 +1361,7 @@ return error; sc->tx_queued++; + sc->tx_cur = (sc->tx_cur + 1) % RUM_TX_LIST_COUNT; return 0; } @@ -1316,8 +1394,6 @@ rate = ni->ni_txrate; } - rate &= IEEE80211_RATE_VAL; - if (wh->i_fc[1] & IEEE80211_FC1_WEP) { k = ieee80211_crypto_encap(ni, m0); if (k == NULL) { @@ -1329,6 +1405,23 @@ wh = mtod(m0, struct ieee80211_frame *); } + if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { + int prot = IEEE80211_PROT_NONE; + if (m0->m_pkthdr.len + IEEE80211_CRC_LEN > vap->iv_rtsthreshold) + prot = IEEE80211_PROT_RTSCTS; + else if ((ic->ic_flags & IEEE80211_F_USEPROT) && + RUM_RATE_IS_OFDM(rate)) + prot = ic->ic_protmode; + if (prot != IEEE80211_PROT_NONE) { + error = rum_sendprot(sc, m0, ni, prot, rate); + if (error) { + m_freem(m0); + return error; + } + flags |= RT2573_TX_LONG_RETRY | RT2573_TX_IFS_SIFS; + } + } + data = &sc->tx_data[0]; desc = (struct rum_tx_desc *)data->buf; @@ -1384,6 +1477,7 @@ } sc->tx_queued++; + sc->tx_cur = (sc->tx_cur + 1) % RUM_TX_LIST_COUNT; return 0; } @@ -1399,7 +1493,7 @@ IFQ_DRV_DEQUEUE(&ifp->if_snd, m); if (m == NULL) break; - if (sc->tx_queued >= RUM_TX_LIST_COUNT) { + if (sc->tx_queued >= RUM_TX_LIST_COUNT-1) { IFQ_DRV_PREPEND(&ifp->if_snd, m); ifp->if_drv_flags |= IFF_DRV_OACTIVE; break; @@ -2277,7 +2371,7 @@ ieee80211_free_node(ni); return ENETDOWN; } - if (sc->tx_queued >= RUM_TX_LIST_COUNT) { + if (sc->tx_queued >= RUM_TX_LIST_COUNT-1) { ifp->if_drv_flags |= IFF_DRV_OACTIVE; m_freem(m); ieee80211_free_node(ni); ==== //depot/projects/vap/sys/dev/usb/if_rumvar.h#7 (text+ko) ==== @@ -18,7 +18,7 @@ */ #define RUM_RX_LIST_COUNT 1 -#define RUM_TX_LIST_COUNT 1 +#define RUM_TX_LIST_COUNT 8 struct rum_rx_radiotap_header { struct ieee80211_radiotap_header wr_ihdr; @@ -118,6 +118,7 @@ struct rum_rx_data rx_data[RUM_RX_LIST_COUNT]; struct rum_tx_data tx_data[RUM_TX_LIST_COUNT]; int tx_queued; + int tx_cur; struct mtx sc_mtx; From owner-p4-projects@FreeBSD.ORG Sun Mar 16 17:13:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5F9A11065673; Sun, 16 Mar 2008 17:13:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DE09106566B for ; Sun, 16 Mar 2008 17:13:08 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 222748FC21 for ; Sun, 16 Mar 2008 17:13:08 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GHD7iR000957 for ; Sun, 16 Mar 2008 17:13:07 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GHD7Vq000955 for perforce@freebsd.org; Sun, 16 Mar 2008 17:13:07 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 17:13:07 GMT Message-Id: <200803161713.m2GHD7Vq000955@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137842 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 17:13:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=137842 Change 137842 by sam@sam_ebb on 2008/03/16 17:12:39 o add ieee80211_rate2plcp to convert an 802.11 rate to a PLCP signal value o add ieee80211_ctl_rate to return the rate to send a ctl frame given a tx rate; this is same as the ack rate but duplicated for clarity Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_phy.c#4 edit .. //depot/projects/vap/sys/net80211/ieee80211_phy.h#4 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_phy.c#4 (text+ko) ==== @@ -339,6 +339,31 @@ } /* + * Covert 802.11 rate to PLCP signal. + */ +uint8_t +ieee80211_rate2plcp(int rate) +{ + switch (rate) { + /* CCK rates (returned values are device-dependent) */ + case 2: return 0x0; + case 4: return 0x1; + case 11: return 0x2; + case 22: return 0x3; + + /* OFDM rates (cf IEEE Std 802.11a-1999, pp. 14 Table 80) */ + case 12: return 0xb; + case 18: return 0xf; + case 24: return 0xa; + case 36: return 0xe; + case 48: return 0x9; + case 72: return 0xd; + case 96: return 0x8; + case 108: return 0xc; + } + return 0xff; /* XXX unsupported/unknown rate */ +} +/* * Compute the time to transmit a frame of length frameLen bytes * using the specified rate, phy, and short preamble setting. * SIFS is included. ==== //depot/projects/vap/sys/net80211/ieee80211_phy.h#4 (text+ko) ==== @@ -88,6 +88,14 @@ return rt->info[cix].dot11Rate; } +static __inline__ uint8_t +ieee80211_ctl_rate(const struct ieee80211_rate_table *rt, uint8_t rate) +{ + uint8_t cix = rt->info[rt->rateCodeToIndex[rate]].ctlRateIndex; + KASSERT(cix != (uint8_t)-1, ("rate %d has no info", rate)); + return rt->info[cix].dot11Rate; +} + static __inline__ enum ieee80211_phytype ieee80211_rate2phytype(const struct ieee80211_rate_table *rt, uint8_t rate) { @@ -130,8 +138,12 @@ uint16_t ieee80211_compute_duration(const struct ieee80211_rate_table *, uint32_t frameLen, uint16_t rate, int isShortPreamble); /* - * Covert PLCP signal/rate field to 802.11 rate code (.5Mbits/s) + * Convert PLCP signal/rate field to 802.11 rate code (.5Mbits/s) */ uint8_t ieee80211_plcp2rate(uint8_t, int); +/* + * Convert 802.11 rate code to PLCP signal. + */ +uint8_t ieee80211_rate2plcp(int); #endif /* _KERNEL */ #endif /* !_NET80211_IEEE80211_PHY_H_ */ From owner-p4-projects@FreeBSD.ORG Sun Mar 16 17:17:12 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 650BF106566C; Sun, 16 Mar 2008 17:17:12 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 235EC1065670 for ; Sun, 16 Mar 2008 17:17:12 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2714A8FC18 for ; Sun, 16 Mar 2008 17:17:12 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GHHBKi001498 for ; Sun, 16 Mar 2008 17:17:11 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GHHBkj001496 for perforce@freebsd.org; Sun, 16 Mar 2008 17:17:11 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 17:17:11 GMT Message-Id: <200803161717.m2GHHBkj001496@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137843 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 17:17:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=137843 Change 137843 by sam@sam_ebb on 2008/03/16 17:16:39 switch to public phy support Affected files ... .. //depot/projects/vap/sys/dev/usb/if_ural.c#16 edit .. //depot/projects/vap/sys/dev/usb/if_uralvar.h#10 edit Differences ... ==== //depot/projects/vap/sys/dev/usb/if_ural.c#16 (text+ko) ==== @@ -51,6 +51,7 @@ #include #include +#include #include #include @@ -128,14 +129,10 @@ static void ural_scantask(void *); static int ural_newstate(struct ieee80211vap *, enum ieee80211_state, int); -static int ural_rxrate(struct ural_rx_desc *); static void ural_txeof(usbd_xfer_handle, usbd_private_handle, usbd_status); static void ural_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); -static int ural_ack_rate(struct ieee80211com *, int); -static uint16_t ural_txtime(int, int, uint32_t); -static uint8_t ural_plcp_signal(int); static void ural_setup_tx_desc(struct ural_softc *, struct ural_tx_desc *, uint32_t, int, int); static int ural_tx_bcn(struct ural_softc *, struct mbuf *, @@ -513,6 +510,8 @@ ic->ic_vap_create = ural_vap_create; ic->ic_vap_delete = ural_vap_delete; + sc->sc_rates = ieee80211_get_ratetable(ic->ic_curchan); + bpfattach(ifp, DLT_IEEE802_11_RADIO, sizeof (struct ieee80211_frame) + sizeof(sc->sc_txtap)); @@ -863,47 +862,8 @@ } } -/* quickly determine if a given rate is CCK or OFDM */ -#define RAL_RATE_IS_OFDM(rate) ((rate) >= 12 && (rate) != 22) - -#define RAL_ACK_SIZE 14 /* 10 + 4(FCS) */ -#define RAL_CTS_SIZE 14 /* 10 + 4(FCS) */ - -#define RAL_SIFS 10 /* us */ - #define RAL_RXTX_TURNAROUND 5 /* us */ -/* - * This function is only used by the Rx radiotap code. - */ -static int -ural_rxrate(struct ural_rx_desc *desc) -{ - if (le32toh(desc->flags) & RAL_RX_OFDM) { - /* reverse function of ural_plcp_signal */ - switch (desc->rate) { - case 0xb: return 12; - case 0xf: return 18; - case 0xa: return 24; - case 0xe: return 36; - case 0x9: return 48; - case 0xd: return 72; - case 0x8: return 96; - case 0xc: return 108; - } - } else { - if (desc->rate == 10) - return 2; - if (desc->rate == 20) - return 4; - if (desc->rate == 55) - return 11; - if (desc->rate == 110) - return 22; - } - return 2; /* should not get there */ -} - static void ural_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) { @@ -1006,7 +966,8 @@ struct ural_rx_radiotap_header *tap = &sc->sc_rxtap; tap->wr_flags = IEEE80211_RADIOTAP_F_FCS; - tap->wr_rate = ural_rxrate(desc); + tap->wr_rate = ieee80211_plcp2rate(desc->rate, + le32toh(desc->flags) & RAL_RX_OFDM); tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wr_antenna = sc->rx_ant; @@ -1034,90 +995,6 @@ usbd_transfer(xfer); } -/* - * Return the expected ack rate for a frame transmitted at rate `rate'. - * XXX: this should depend on the destination node basic rate set. - */ -static int -ural_ack_rate(struct ieee80211com *ic, int rate) -{ - switch (rate) { - /* CCK rates */ - case 2: - return 2; - case 4: - case 11: - case 22: - return (ic->ic_curmode == IEEE80211_MODE_11B) ? 4 : rate; - - /* OFDM rates */ - case 12: - case 18: - return 12; - case 24: - case 36: - return 24; - case 48: - case 72: - case 96: - case 108: - return 48; - } - - /* default to 1Mbps */ - return 2; -} - -/* - * Compute the duration (in us) needed to transmit `len' bytes at rate `rate'. - * The function automatically determines the operating mode depending on the - * given rate. `flags' indicates whether short preamble is in use or not. - */ -static uint16_t -ural_txtime(int len, int rate, uint32_t flags) -{ - uint16_t txtime; - - if (RAL_RATE_IS_OFDM(rate)) { - /* IEEE Std 802.11a-1999, pp. 37 */ - txtime = (8 + 4 * len + 3 + rate - 1) / rate; - txtime = 16 + 4 + 4 * txtime + 6; - } else { - /* IEEE Std 802.11b-1999, pp. 28 */ - txtime = (16 * len + rate - 1) / rate; - if (rate != 2 && (flags & IEEE80211_F_SHPREAMBLE)) - txtime += 72 + 24; - else - txtime += 144 + 48; - } - return txtime; -} - -static uint8_t -ural_plcp_signal(int rate) -{ - switch (rate) { - /* CCK rates (returned values are device-dependent) */ - case 2: return 0x0; - case 4: return 0x1; - case 11: return 0x2; - case 22: return 0x3; - - /* OFDM rates (cf IEEE Std 802.11a-1999, pp. 14 Table 80) */ - case 12: return 0xb; - case 18: return 0xf; - case 24: return 0xa; - case 36: return 0xe; - case 48: return 0x9; - case 72: return 0xd; - case 96: return 0x8; - case 108: return 0xc; - - /* unsupported rates (should not get there) */ - default: return 0xff; - } -} - static void ural_setup_tx_desc(struct ural_softc *sc, struct ural_tx_desc *desc, uint32_t flags, int len, int rate) @@ -1134,11 +1011,11 @@ desc->wme |= htole16(RAL_IVOFFSET(sizeof (struct ieee80211_frame))); /* setup PLCP fields */ - desc->plcp_signal = ural_plcp_signal(rate); + desc->plcp_signal = ieee80211_rate2plcp(rate); desc->plcp_service = 4; len += IEEE80211_CRC_LEN; - if (RAL_RATE_IS_OFDM(rate)) { + if (ieee80211_rate2phytype(sc->sc_rates, rate) == IEEE80211_T_OFDM) { desc->flags |= htole32(RAL_TX_OFDM); plcp_length = len & 0xfff; @@ -1258,7 +1135,8 @@ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RAL_TX_ACK; - dur = ural_txtime(RAL_ACK_SIZE, tp->mgmtrate, ic->ic_flags) + RAL_SIFS; + dur = ieee80211_ack_duration(sc->sc_rates, tp->mgmtrate, + ic->ic_flags & IEEE80211_F_SHPREAMBLE); *(uint16_t *)wh->i_dur = htole16(dur); /* tell hardware to add timestamp for probe responses */ @@ -1324,7 +1202,7 @@ struct ural_tx_desc *desc; struct ural_tx_data *data; struct mbuf *mprot; - int protrate, ackrate, pktlen, flags; + int protrate, ackrate, pktlen, flags, isshort; uint16_t dur; usbd_status error; @@ -1334,17 +1212,16 @@ wh = mtod(m, const struct ieee80211_frame *); pktlen = m->m_pkthdr.len + IEEE80211_CRC_LEN; - /* XXX use phy support */ - protrate = 2; - ackrate = ural_ack_rate(ic, rate); + protrate = ieee80211_ctl_rate(sc->sc_rates, rate); + ackrate = ieee80211_ack_rate(sc->sc_rates, rate); - dur = ural_txtime(pktlen, rate, ic->ic_flags) + - ural_txtime(RAL_ACK_SIZE, ackrate, ic->ic_flags) + - 2 * RAL_SIFS; + isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; + dur = ieee80211_compute_duration(sc->sc_rates, pktlen, rate, isshort); + + ieee80211_ack_duration(sc->sc_rates, rate, isshort); flags = RAL_TX_RETRY(7); if (prot == IEEE80211_PROT_RTSCTS) { - dur += ural_txtime(RAL_CTS_SIZE, - ural_ack_rate(ic, protrate), ic->ic_flags) + RAL_SIFS; + /* NB: CTS is the same size as an ACK */ + dur += ieee80211_ack_duration(sc->sc_rates, rate, isshort); flags |= RAL_TX_ACK; mprot = ieee80211_alloc_rts(ic, wh->i_addr1, wh->i_addr2, dur); } else { @@ -1509,7 +1386,7 @@ if (m0->m_pkthdr.len + IEEE80211_CRC_LEN > vap->iv_rtsthreshold) prot = IEEE80211_PROT_RTSCTS; else if ((ic->ic_flags & IEEE80211_F_USEPROT) && - RAL_RATE_IS_OFDM(rate)) + ieee80211_rate2phytype(sc->sc_rates, rate) == IEEE80211_T_OFDM) prot = ic->ic_protmode; if (prot != IEEE80211_PROT_NONE) { error = ural_sendprot(sc, m0, ni, prot, rate); @@ -1531,8 +1408,8 @@ flags |= RAL_TX_ACK; flags |= RAL_TX_RETRY(7); - dur = ural_txtime(RAL_ACK_SIZE, ural_ack_rate(ic, rate), - ic->ic_flags) + RAL_SIFS; + dur = ieee80211_ack_duration(sc->sc_rates, rate, + ic->ic_flags & IEEE80211_F_SHPREAMBLE); *(uint16_t *)wh->i_dur = htole16(dur); } @@ -1909,6 +1786,8 @@ /* do it in a process context */ sc->sc_scan_action = URAL_SET_CHANNEL; usb_add_task(sc->sc_udev, &sc->sc_scantask, USB_TASKQ_DRIVER); + + sc->sc_rates = ieee80211_get_ratetable(ic->ic_curchan); } static void ==== //depot/projects/vap/sys/dev/usb/if_uralvar.h#10 (text+ko) ==== @@ -98,6 +98,8 @@ usbd_device_handle sc_udev; usbd_interface_handle sc_iface; + const struct ieee80211_rate_table *sc_rates; + int sc_rx_no; int sc_tx_no; From owner-p4-projects@FreeBSD.ORG Sun Mar 16 17:39:36 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1D6671065678; Sun, 16 Mar 2008 17:39:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0C001065674 for ; Sun, 16 Mar 2008 17:39:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C95B58FC25 for ; Sun, 16 Mar 2008 17:39:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GHdZgC003455 for ; Sun, 16 Mar 2008 17:39:35 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GHdZhA003453 for perforce@freebsd.org; Sun, 16 Mar 2008 17:39:35 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 17:39:35 GMT Message-Id: <200803161739.m2GHdZhA003453@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137845 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 17:39:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=137845 Change 137845 by sam@sam_ebb on 2008/03/16 17:39:06 simplify ieee80211_plcp2rate; it's not use doesn't warrant the extra code to validate the plcp parameter Affected files ... .. //depot/projects/vap/sys/net80211/ieee80211_phy.c#5 edit Differences ... ==== //depot/projects/vap/sys/net80211/ieee80211_phy.c#5 (text+ko) ==== @@ -300,27 +300,19 @@ } /* - * Covert PLCP signal/rate field to 802.11 rate (.5Mbits/s) + * Convert PLCP signal/rate field to 802.11 rate (.5Mbits/s) + * + * Note we do no parameter checking; this routine is mainly + * used to derive an 802.11 rate for constructing radiotap + * header data for rx frames. + * + * XXX might be a candidate for inline */ uint8_t ieee80211_plcp2rate(uint8_t plcp, int ofdm) { - if (!ofdm) { - switch (plcp) { - /* IEEE Std 802.11b-1999 page 15, subclause 18.2.3.3 */ - case 0x0a: - case 0x14: - case 0x37: - case 0x6e: - /* IEEE Std 802.11g-2003 page 19, subclause 19.3.2.1 */ - case 0xdc: - return plcp / 5; - } - } else { -#define _OFDM_PLCP2RATE_MAX 16 - - /* IEEE Std 802.11a-1999 page 14, subclause 17.3.4.1 */ - static const uint8_t ofdm_plcp2rate[_OFDM_PLCP2RATE_MAX] = { + if (ofdm) { + static const uint8_t ofdm_plcp2rate[16] = { [0xb] = 12, [0xf] = 18, [0xa] = 24, @@ -330,12 +322,17 @@ [0x8] = 96, [0xc] = 108 }; - if (plcp < _OFDM_PLCP2RATE_MAX) - return ofdm_plcp2rate[plcp]; - -#undef _OFDM_PLCP2RATE_MAX + return ofdm_plcp2rate[plcp & 0xf]; + } else { + static const uint8_t cck_plcp2rate[16] = { + [0xa] = 2, /* 0x0a */ + [0x4] = 4, /* 0x14 */ + [0x7] = 11, /* 0x37 */ + [0xe] = 22, /* 0x6e */ + [0xc] = 44, /* 0xdc , actually PBCC */ + }; + return cck_plcp2rate[plcp & 0xf]; } - return 0; } /* From owner-p4-projects@FreeBSD.ORG Sun Mar 16 17:39:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0AB74106566C; Sun, 16 Mar 2008 17:39:36 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3D511065676 for ; Sun, 16 Mar 2008 17:39:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EC8228FC26 for ; Sun, 16 Mar 2008 17:39:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GHdZm4003460 for ; Sun, 16 Mar 2008 17:39:35 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GHdZiq003458 for perforce@freebsd.org; Sun, 16 Mar 2008 17:39:35 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 17:39:35 GMT Message-Id: <200803161739.m2GHdZiq003458@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137846 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 17:39:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=137846 Change 137846 by sam@sam_ebb on 2008/03/16 17:39:21 switch to public phy routines Affected files ... .. //depot/projects/vap/sys/dev/usb/if_zyd.c#13 edit Differences ... ==== //depot/projects/vap/sys/dev/usb/if_zyd.c#13 (text+ko) ==== @@ -47,6 +47,7 @@ #include #include +#include #include #include @@ -209,7 +210,6 @@ static int zyd_set_rxfilter(struct zyd_softc *); static void zyd_set_chan(struct zyd_softc *, struct ieee80211_channel *); static int zyd_set_beacon_interval(struct zyd_softc *, int); -static uint8_t zyd_plcp_signal(int); static void zyd_intr(usbd_xfer_handle, usbd_private_handle, usbd_status); static void zyd_rx_data(struct zyd_softc *, const uint8_t *, uint16_t); static void zyd_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); @@ -1840,31 +1840,6 @@ return 0; } -static uint8_t -zyd_plcp_signal(int rate) -{ - switch (rate) { - /* CCK rates (returned values are device-dependent) */ - case 2: return 0x0; - case 4: return 0x1; - case 11: return 0x2; - case 22: return 0x3; - - /* OFDM rates (cf IEEE Std 802.11a-1999, pp. 14 Table 80) */ - case 12: return 0xb; - case 18: return 0xf; - case 24: return 0xa; - case 36: return 0xe; - case 48: return 0x9; - case 72: return 0xd; - case 96: return 0x8; - case 108: return 0xc; - - /* unsupported rates (should not get there) */ - default: return 0xff; - } -} - static void zyd_intr(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) { @@ -1947,20 +1922,6 @@ } } -static __inline uint8_t -zyd_plcp2ieee(int signal, int isofdm) -{ - if (isofdm) { - static const uint8_t ofdmrates[16] = - { 0, 0, 0, 0, 0, 0, 0, 96, 48, 24, 12, 108, 72, 36, 18 }; - return ofdmrates[signal & 0xf]; - } else { - static const uint8_t cckrates[16] = - { 0, 0, 0, 0, 4, 0, 0, 11, 0, 0, 2, 0, 0, 0, 22, 0 }; - return cckrates[signal & 0xf]; - } -} - static void zyd_rx_data(struct zyd_softc *sc, const uint8_t *buf, uint16_t len) { @@ -2018,8 +1979,8 @@ /* XXX toss, no way to express errors */ if (stat->flags & ZYD_RX_DECRYPTERR) tap->wr_flags |= IEEE80211_RADIOTAP_F_BADFCS; - tap->wr_rate = - zyd_plcp2ieee(plcp->signal, stat->flags & ZYD_RX_OFDM); + tap->wr_rate = ieee80211_plcp2rate(plcp->signal, + stat->flags & ZYD_RX_OFDM); tap->wr_antsignal = stat->rssi + -95; tap->wr_antnoise = -95; /* XXX */ @@ -2156,7 +2117,7 @@ (IEEE80211_FC0_TYPE_CTL | IEEE80211_FC0_SUBTYPE_PS_POLL)) desc->flags |= ZYD_TX_FLAG_TYPE(ZYD_TX_TYPE_PS_POLL); - desc->phy = zyd_plcp_signal(rate); + desc->phy = ieee80211_rate2plcp(rate); if (ZYD_RATE_IS_OFDM(rate)) { desc->phy |= ZYD_TX_PHY_OFDM; if (IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan)) @@ -2327,7 +2288,7 @@ (IEEE80211_FC0_TYPE_CTL | IEEE80211_FC0_SUBTYPE_PS_POLL)) desc->flags |= ZYD_TX_FLAG_TYPE(ZYD_TX_TYPE_PS_POLL); - desc->phy = zyd_plcp_signal(rate); + desc->phy = ieee80211_rate2plcp(rate); if (ZYD_RATE_IS_OFDM(rate)) { desc->phy |= ZYD_TX_PHY_OFDM; if (IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan)) From owner-p4-projects@FreeBSD.ORG Sun Mar 16 17:56:56 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3BED91065689; Sun, 16 Mar 2008 17:56:56 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDE7C1065680 for ; Sun, 16 Mar 2008 17:56:55 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B704E8FC35 for ; Sun, 16 Mar 2008 17:56:55 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GHutjO004113 for ; Sun, 16 Mar 2008 17:56:55 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GHutZY004111 for perforce@freebsd.org; Sun, 16 Mar 2008 17:56:55 GMT (envelope-from sam@freebsd.org) Date: Sun, 16 Mar 2008 17:56:55 GMT Message-Id: <200803161756.m2GHutZY004111@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 137849 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 17:56:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=137849 Change 137849 by sam@sam_ebb on 2008/03/16 17:56:51 blindly convert to use common phy support routines Affected files ... .. //depot/projects/vap/sys/dev/usb/if_rum.c#12 edit .. //depot/projects/vap/sys/dev/usb/if_rumvar.h#8 edit Differences ... ==== //depot/projects/vap/sys/dev/usb/if_rum.c#12 (text+ko) ==== @@ -51,6 +51,7 @@ #include #include +#include #include #include @@ -143,10 +144,6 @@ usbd_status); static void rum_rxeof(usbd_xfer_handle, usbd_private_handle, usbd_status); -static int rum_rxrate(struct rum_rx_desc *); -static int rum_ack_rate(struct ieee80211com *, int); -static uint16_t rum_txtime(int, int, uint32_t); -static uint8_t rum_plcp_signal(int); static void rum_setup_tx_desc(struct rum_softc *, struct rum_tx_desc *, uint32_t, uint16_t, int, int); @@ -524,6 +521,8 @@ ic->ic_vap_create = rum_vap_create; ic->ic_vap_delete = rum_vap_delete; + sc->sc_rates = ieee80211_get_ratetable(ic->ic_curchan); + bpfattach(ifp, DLT_IEEE802_11_RADIO, sizeof (struct ieee80211_frame) + sizeof(sc->sc_txtap)); @@ -831,12 +830,6 @@ } } -/* quickly determine if a given rate is CCK or OFDM */ -#define RUM_RATE_IS_OFDM(rate) ((rate) >= 12 && (rate) != 22) - -#define RUM_ACK_SIZE 14 /* 10 + 4(FCS) */ -#define RUM_CTS_SIZE 14 /* 10 + 4(FCS) */ - static void rum_txeof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status) { @@ -939,7 +932,8 @@ struct rum_rx_radiotap_header *tap = &sc->sc_rxtap; tap->wr_flags = IEEE80211_RADIOTAP_F_FCS; - tap->wr_rate = rum_rxrate(desc); + tap->wr_rate = ieee80211_plcp2rate(desc->rate, + le32toh(desc->flags) & RT2573_RX_OFDM); tap->wr_chan_freq = htole16(ic->ic_curchan->ic_freq); tap->wr_chan_flags = htole16(ic->ic_curchan->ic_flags); tap->wr_antenna = sc->rx_ant; @@ -966,120 +960,6 @@ usbd_transfer(xfer); } -/* - * This function is only used by the Rx radiotap code. - */ -static int -rum_rxrate(struct rum_rx_desc *desc) -{ - if (le32toh(desc->flags) & RT2573_RX_OFDM) { - /* reverse function of rum_plcp_signal */ - switch (desc->rate) { - case 0xb: return 12; - case 0xf: return 18; - case 0xa: return 24; - case 0xe: return 36; - case 0x9: return 48; - case 0xd: return 72; - case 0x8: return 96; - case 0xc: return 108; - } - } else { - if (desc->rate == 10) - return 2; - if (desc->rate == 20) - return 4; - if (desc->rate == 55) - return 11; - if (desc->rate == 110) - return 22; - } - return 2; /* should not get there */ -} - -/* - * Return the expected ack rate for a frame transmitted at rate `rate'. - */ -static int -rum_ack_rate(struct ieee80211com *ic, int rate) -{ - switch (rate) { - /* CCK rates */ - case 2: - return 2; - case 4: - case 11: - case 22: - return (ic->ic_curmode == IEEE80211_MODE_11B) ? 4 : rate; - - /* OFDM rates */ - case 12: - case 18: - return 12; - case 24: - case 36: - return 24; - case 48: - case 72: - case 96: - case 108: - return 48; - } - - /* default to 1Mbps */ - return 2; -} - -/* - * Compute the duration (in us) needed to transmit `len' bytes at rate `rate'. - * The function automatically determines the operating mode depending on the - * given rate. `flags' indicates whether short preamble is in use or not. - */ -static uint16_t -rum_txtime(int len, int rate, uint32_t flags) -{ - uint16_t txtime; - - if (RUM_RATE_IS_OFDM(rate)) { - /* IEEE Std 802.11a-1999, pp. 37 */ - txtime = (8 + 4 * len + 3 + rate - 1) / rate; - txtime = 16 + 4 + 4 * txtime + 6; - } else { - /* IEEE Std 802.11b-1999, pp. 28 */ - txtime = (16 * len + rate - 1) / rate; - if (rate != 2 && (flags & IEEE80211_F_SHPREAMBLE)) - txtime += 72 + 24; - else - txtime += 144 + 48; - } - return txtime; -} - -static uint8_t -rum_plcp_signal(int rate) -{ - switch (rate) { - /* CCK rates (returned values are device-dependent) */ - case 2: return 0x0; - case 4: return 0x1; - case 11: return 0x2; - case 22: return 0x3; - - /* OFDM rates (cf IEEE Std 802.11a-1999, pp. 14 Table 80) */ - case 12: return 0xb; - case 18: return 0xf; - case 24: return 0xa; - case 36: return 0xe; - case 48: return 0x9; - case 72: return 0xd; - case 96: return 0x8; - case 108: return 0xc; - - /* unsupported rates (should not get there) */ - default: return 0xff; - } -} - static void rum_setup_tx_desc(struct rum_softc *sc, struct rum_tx_desc *desc, uint32_t flags, uint16_t xflags, int len, int rate) @@ -1098,11 +978,11 @@ RT2573_LOGCWMIN(4) | RT2573_LOGCWMAX(10)); /* setup PLCP fields */ - desc->plcp_signal = rum_plcp_signal(rate); + desc->plcp_signal = ieee80211_rate2plcp(rate); desc->plcp_service = 4; len += IEEE80211_CRC_LEN; - if (RUM_RATE_IS_OFDM(rate)) { + if (ieee80211_rate2phytype(sc->sc_rates, rate) == IEEE80211_T_OFDM) { desc->flags |= htole32(RT2573_TX_OFDM); plcp_length = len & 0xfff; @@ -1134,7 +1014,7 @@ struct rum_tx_desc *desc; struct rum_tx_data *data; struct mbuf *mprot; - int protrate, ackrate, pktlen, flags; + int protrate, ackrate, pktlen, flags, isshort; uint16_t dur; usbd_status error; @@ -1144,17 +1024,16 @@ wh = mtod(m, const struct ieee80211_frame *); pktlen = m->m_pkthdr.len + IEEE80211_CRC_LEN; - /* XXX use phy support */ - protrate = 2; - ackrate = rum_ack_rate(ic, rate); + protrate = ieee80211_ctl_rate(sc->sc_rates, rate); + ackrate = ieee80211_ack_rate(sc->sc_rates, rate); - dur = rum_txtime(pktlen, rate, ic->ic_flags) + - rum_txtime(RUM_ACK_SIZE, ackrate, ic->ic_flags) + - 2 * sc->sifs; + isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; + dur = ieee80211_compute_duration(sc->sc_rates, pktlen, rate, isshort); + + ieee80211_ack_duration(sc->sc_rates, rate, isshort); flags = RT2573_TX_MORE_FRAG; if (prot == IEEE80211_PROT_RTSCTS) { - dur += rum_txtime(RUM_CTS_SIZE, - rum_ack_rate(ic, protrate), ic->ic_flags) + sc->sifs; + /* NB: CTS is the same size as an ACK */ + dur += ieee80211_ack_duration(sc->sc_rates, rate, isshort); flags |= RT2573_TX_NEED_ACK; mprot = ieee80211_alloc_rts(ic, wh->i_addr1, wh->i_addr2, dur); } else { @@ -1169,7 +1048,8 @@ data->m = mprot; data->ni = ieee80211_ref_node(ni); - m_copydata(mprot, 0, mprot->m_pkthdr.len, data->buf + RT2573_TX_DESC_SIZE); + m_copydata(mprot, 0, mprot->m_pkthdr.len, + data->buf + RT2573_TX_DESC_SIZE); rum_setup_tx_desc(sc, desc, flags, 0, mprot->m_pkthdr.len, protrate); usbd_setup_xfer(data->xfer, sc->sc_tx_pipeh, data, data->buf, @@ -1226,8 +1106,8 @@ if (!IEEE80211_IS_MULTICAST(wh->i_addr1)) { flags |= RT2573_TX_NEED_ACK; - dur = rum_txtime(RUM_ACK_SIZE, rum_ack_rate(ic, tp->mgmtrate), - ic->ic_flags) + sc->sifs; + dur = ieee80211_ack_duration(sc->sc_rates, tp->mgmtrate, + ic->ic_flags & IEEE80211_F_SHPREAMBLE); *(uint16_t *)wh->i_dur = htole16(dur); /* tell hardware to add timestamp for probe responses */ @@ -1410,7 +1290,7 @@ if (m0->m_pkthdr.len + IEEE80211_CRC_LEN > vap->iv_rtsthreshold) prot = IEEE80211_PROT_RTSCTS; else if ((ic->ic_flags & IEEE80211_F_USEPROT) && - RUM_RATE_IS_OFDM(rate)) + ieee80211_rate2phytype(sc->sc_rates, rate) == IEEE80211_T_OFDM) prot = ic->ic_protmode; if (prot != IEEE80211_PROT_NONE) { error = rum_sendprot(sc, m0, ni, prot, rate); @@ -1432,8 +1312,8 @@ flags |= RT2573_TX_NEED_ACK; flags |= RT2573_TX_MORE_FRAG; - dur = rum_txtime(RUM_ACK_SIZE, rum_ack_rate(ic, rate), - ic->ic_flags) + sc->sifs; + dur = ieee80211_ack_duration(sc->sc_rates, rate, + ic->ic_flags & IEEE80211_F_SHPREAMBLE); *(uint16_t *)wh->i_dur = htole16(dur); } @@ -1839,9 +1719,6 @@ else tmp |= RT2573_PA_PE_5GHZ; rum_write(sc, RT2573_PHY_CSR0, tmp); - - /* 802.11a uses a 16 microseconds short interframe space */ - sc->sifs = IEEE80211_IS_CHAN_5GHZ(c) ? 16 : 10; } static void @@ -2521,6 +2398,8 @@ /* do it in a process context */ sc->sc_scan_action = RUM_SET_CHANNEL; usb_add_task(sc->sc_udev, &sc->sc_scantask, USB_TASKQ_DRIVER); + + sc->sc_rates = ieee80211_get_ratetable(ic->ic_curchan); } static void ==== //depot/projects/vap/sys/dev/usb/if_rumvar.h#8 (text+ko) ==== @@ -89,6 +89,7 @@ struct rum_softc { struct ieee80211com sc_ic; /* NB: must be first */ struct ifnet *sc_ifp; + const struct ieee80211_rate_table *sc_rates; device_t sc_dev; usbd_device_handle sc_udev; @@ -143,7 +144,6 @@ int ext_5ghz_lna; int rssi_2ghz_corr; int rssi_5ghz_corr; - int sifs; uint8_t bbp17; struct rum_rx_radiotap_header sc_rxtap; From owner-p4-projects@FreeBSD.ORG Sun Mar 16 20:48:58 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8A7401065674; Sun, 16 Mar 2008 20:48:58 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4618F106566C for ; Sun, 16 Mar 2008 20:48:58 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 15FFD8FC25 for ; Sun, 16 Mar 2008 20:48:58 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GKmvgT046481 for ; Sun, 16 Mar 2008 20:48:57 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GKmvx0046479 for perforce@freebsd.org; Sun, 16 Mar 2008 20:48:57 GMT (envelope-from marcel@freebsd.org) Date: Sun, 16 Mar 2008 20:48:57 GMT Message-Id: <200803162048.m2GKmvx0046479@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 137860 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 20:48:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=137860 Change 137860 by marcel@marcel_xcllnt on 2008/03/16 20:48:13 IFC @137859 Affected files ... .. //depot/projects/bdb/ObsoleteFiles.inc#3 integrate .. //depot/projects/bdb/bin/Makefile#2 integrate .. //depot/projects/bdb/bin/uuidgen/Makefile#2 integrate .. //depot/projects/bdb/lib/libarchive/Makefile#2 integrate .. //depot/projects/bdb/lib/libarchive/archive.h.in#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_entry.3#3 integrate .. //depot/projects/bdb/lib/libarchive/archive_entry.c#3 integrate .. //depot/projects/bdb/lib/libarchive/archive_entry.h#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_read_private.h#3 integrate .. //depot/projects/bdb/lib/libarchive/archive_read_support_format_mtree.c#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_read_support_format_tar.c#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_string.h#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_string_sprintf.c#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_util.c#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_write.c#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_write_disk.c#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_write_private.h#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_write_set_compression_compress.c#1 branch .. //depot/projects/bdb/lib/libarchive/archive_write_set_format_ar.c#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_write_set_format_cpio.c#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_write_set_format_cpio_newc.c#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_write_set_format_pax.c#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_write_set_format_shar.c#2 integrate .. //depot/projects/bdb/lib/libarchive/archive_write_set_format_ustar.c#2 integrate .. //depot/projects/bdb/lib/libarchive/config_freebsd.h#2 integrate .. //depot/projects/bdb/lib/libarchive/test/.cvsignore#1 branch .. //depot/projects/bdb/lib/libarchive/test/Makefile#3 integrate .. //depot/projects/bdb/lib/libarchive/test/test_archive_api_feature.c#2 integrate .. //depot/projects/bdb/lib/libarchive/test/test_empty_write.c#2 integrate .. //depot/projects/bdb/lib/libarchive/test/test_entry.c#3 integrate .. //depot/projects/bdb/lib/libarchive/test/test_pax_filename_encoding.c#1 branch .. //depot/projects/bdb/lib/libarchive/test/test_pax_filename_encoding.tar.gz.uu#1 branch .. //depot/projects/bdb/lib/libarchive/test/test_write_compress.c#1 branch .. //depot/projects/bdb/lib/libc/gen/scandir.c#2 integrate .. //depot/projects/bdb/lib/libc/gen/sem_timedwait.3#2 integrate .. //depot/projects/bdb/lib/libc/gen/sem_wait.3#3 integrate .. //depot/projects/bdb/lib/libc/sys/kldunload.2#3 integrate .. //depot/projects/bdb/lib/libpmc/pmc.3#2 integrate .. //depot/projects/bdb/lib/libthr/thread/thr_create.c#3 integrate .. //depot/projects/bdb/release/doc/en_US.ISO8859-1/relnotes/article.sgml#2 integrate .. //depot/projects/bdb/sbin/atacontrol/atacontrol.c#2 integrate .. //depot/projects/bdb/sbin/geom/class/multipath/gmultipath.8#3 integrate .. //depot/projects/bdb/share/examples/cvsup/cvs-supfile#2 integrate .. //depot/projects/bdb/share/man/man9/Makefile#2 integrate .. //depot/projects/bdb/share/man/man9/rwlock.9#2 integrate .. //depot/projects/bdb/share/man/man9/stack.9#2 integrate .. //depot/projects/bdb/sys/amd64/acpica/acpi_machdep.c#2 integrate .. //depot/projects/bdb/sys/amd64/acpica/madt.c#2 integrate .. //depot/projects/bdb/sys/amd64/amd64/intr_machdep.c#2 integrate .. //depot/projects/bdb/sys/amd64/amd64/legacy.c#3 integrate .. //depot/projects/bdb/sys/amd64/amd64/local_apic.c#2 integrate .. //depot/projects/bdb/sys/amd64/amd64/machdep.c#3 integrate .. //depot/projects/bdb/sys/amd64/amd64/mptable.c#2 integrate .. //depot/projects/bdb/sys/amd64/amd64/nexus.c#2 integrate .. //depot/projects/bdb/sys/amd64/ia32/ia32_signal.c#2 integrate .. //depot/projects/bdb/sys/amd64/include/intr_machdep.h#2 integrate .. //depot/projects/bdb/sys/amd64/include/nexusvar.h#1 branch .. //depot/projects/bdb/sys/amd64/isa/atpic.c#2 integrate .. //depot/projects/bdb/sys/amd64/linux32/linux32_proto.h#2 integrate .. //depot/projects/bdb/sys/amd64/linux32/linux32_syscall.h#2 integrate .. //depot/projects/bdb/sys/amd64/linux32/linux32_sysent.c#2 integrate .. //depot/projects/bdb/sys/amd64/linux32/linux32_sysvec.c#3 integrate .. //depot/projects/bdb/sys/amd64/linux32/syscalls.master#2 integrate .. //depot/projects/bdb/sys/arm/arm/intr.c#2 integrate .. //depot/projects/bdb/sys/arm/arm/machdep.c#2 integrate .. //depot/projects/bdb/sys/arm/arm/vm_machdep.c#2 integrate .. //depot/projects/bdb/sys/boot/uboot/Makefile#2 integrate .. //depot/projects/bdb/sys/boot/uboot/common/main.c#2 integrate .. //depot/projects/bdb/sys/boot/uboot/lib/Makefile#2 integrate .. //depot/projects/bdb/sys/boot/uboot/lib/api_public.h#2 integrate .. //depot/projects/bdb/sys/boot/uboot/lib/copy.c#3 integrate .. //depot/projects/bdb/sys/boot/uboot/lib/devicename.c#2 integrate .. //depot/projects/bdb/sys/boot/uboot/lib/disk.c#2 integrate .. //depot/projects/bdb/sys/boot/uboot/lib/elf_freebsd.c#2 integrate .. //depot/projects/bdb/sys/boot/uboot/lib/glue.c#3 integrate .. //depot/projects/bdb/sys/boot/uboot/lib/glue.h#2 integrate .. //depot/projects/bdb/sys/boot/uboot/lib/libuboot.h#3 integrate .. //depot/projects/bdb/sys/boot/uboot/lib/module.c#2 integrate .. //depot/projects/bdb/sys/boot/uboot/lib/net.c#3 integrate .. //depot/projects/bdb/sys/boot/uboot/lib/reboot.c#2 integrate .. //depot/projects/bdb/sys/compat/linux/linux_misc.c#2 integrate .. //depot/projects/bdb/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#2 integrate .. //depot/projects/bdb/sys/contrib/opensolaris/uts/common/os/callb.c#2 integrate .. //depot/projects/bdb/sys/contrib/opensolaris/uts/common/os/taskq.c#2 integrate .. //depot/projects/bdb/sys/dev/aac/aac.c#2 integrate .. //depot/projects/bdb/sys/dev/acpica/acpi.c#3 integrate .. //depot/projects/bdb/sys/dev/acpica/acpivar.h#2 integrate .. //depot/projects/bdb/sys/dev/hwpmc/pmc_events.h#2 integrate .. //depot/projects/bdb/sys/dev/ofw/ofw_console.c#2 integrate .. //depot/projects/bdb/sys/dev/syscons/sysmouse.c#2 integrate .. //depot/projects/bdb/sys/dev/tdfx/tdfx_pci.c#2 integrate .. //depot/projects/bdb/sys/dev/usb/usb_quirks.c#2 integrate .. //depot/projects/bdb/sys/dev/usb/usbdevs#3 integrate .. //depot/projects/bdb/sys/gdb/gdb_cons.c#2 integrate .. //depot/projects/bdb/sys/i386/acpica/acpi_machdep.c#2 integrate .. //depot/projects/bdb/sys/i386/acpica/acpi_wakeup.c#2 integrate .. //depot/projects/bdb/sys/i386/acpica/madt.c#2 integrate .. //depot/projects/bdb/sys/i386/i386/intr_machdep.c#2 integrate .. //depot/projects/bdb/sys/i386/i386/k6_mem.c#3 integrate .. //depot/projects/bdb/sys/i386/i386/legacy.c#3 integrate .. //depot/projects/bdb/sys/i386/i386/local_apic.c#2 integrate .. //depot/projects/bdb/sys/i386/i386/machdep.c#2 integrate .. //depot/projects/bdb/sys/i386/i386/mp_machdep.c#3 integrate .. //depot/projects/bdb/sys/i386/i386/mptable.c#2 integrate .. //depot/projects/bdb/sys/i386/i386/nexus.c#2 integrate .. //depot/projects/bdb/sys/i386/i386/vm_machdep.c#3 integrate .. //depot/projects/bdb/sys/i386/include/intr_machdep.h#2 integrate .. //depot/projects/bdb/sys/i386/include/nexusvar.h#1 branch .. //depot/projects/bdb/sys/i386/isa/atpic.c#2 integrate .. //depot/projects/bdb/sys/i386/linux/linux_proto.h#2 integrate .. //depot/projects/bdb/sys/i386/linux/linux_syscall.h#2 integrate .. //depot/projects/bdb/sys/i386/linux/linux_sysent.c#2 integrate .. //depot/projects/bdb/sys/i386/linux/linux_sysvec.c#3 integrate .. //depot/projects/bdb/sys/i386/linux/syscalls.master#2 integrate .. //depot/projects/bdb/sys/i386/svr4/svr4_machdep.c#2 integrate .. //depot/projects/bdb/sys/i386/xbox/xbox.c#2 integrate .. //depot/projects/bdb/sys/ia64/ia64/interrupt.c#2 integrate .. //depot/projects/bdb/sys/ia64/ia64/machdep.c#3 integrate .. //depot/projects/bdb/sys/ia64/ia64/nexus.c#2 integrate .. //depot/projects/bdb/sys/ia64/ia64/sscdisk.c#2 integrate .. //depot/projects/bdb/sys/ia64/isa/isa_dma.c#2 integrate .. //depot/projects/bdb/sys/kern/init_main.c#2 integrate .. //depot/projects/bdb/sys/kern/kern_alq.c#2 integrate .. //depot/projects/bdb/sys/kern/kern_clock.c#3 integrate .. //depot/projects/bdb/sys/kern/kern_descrip.c#3 integrate .. //depot/projects/bdb/sys/kern/kern_event.c#2 integrate .. //depot/projects/bdb/sys/kern/kern_idle.c#2 integrate .. //depot/projects/bdb/sys/kern/kern_intr.c#3 integrate .. //depot/projects/bdb/sys/kern/kern_linker.c#2 integrate .. //depot/projects/bdb/sys/kern/kern_malloc.c#2 integrate .. //depot/projects/bdb/sys/kern/kern_mbuf.c#2 integrate .. //depot/projects/bdb/sys/kern/kern_module.c#2 integrate .. //depot/projects/bdb/sys/kern/kern_ntptime.c#2 integrate .. //depot/projects/bdb/sys/kern/kern_poll.c#2 integrate .. //depot/projects/bdb/sys/kern/kern_resource.c#3 integrate .. //depot/projects/bdb/sys/kern/kern_shutdown.c#3 integrate .. //depot/projects/bdb/sys/kern/kern_switch.c#3 integrate .. //depot/projects/bdb/sys/kern/kern_synch.c#3 integrate .. //depot/projects/bdb/sys/kern/kern_tc.c#2 integrate .. //depot/projects/bdb/sys/kern/link_elf.c#2 integrate .. //depot/projects/bdb/sys/kern/link_elf_obj.c#2 integrate .. //depot/projects/bdb/sys/kern/sched_4bsd.c#3 integrate .. //depot/projects/bdb/sys/kern/sched_ule.c#3 integrate .. //depot/projects/bdb/sys/kern/subr_autoconf.c#2 integrate .. //depot/projects/bdb/sys/kern/subr_eventhandler.c#2 integrate .. //depot/projects/bdb/sys/kern/subr_log.c#2 integrate .. //depot/projects/bdb/sys/kern/subr_prof.c#2 integrate .. //depot/projects/bdb/sys/kern/subr_smp.c#3 integrate .. //depot/projects/bdb/sys/kern/subr_witness.c#3 integrate .. //depot/projects/bdb/sys/kern/tty_cons.c#2 integrate .. //depot/projects/bdb/sys/kern/tty_pts.c#2 integrate .. //depot/projects/bdb/sys/kern/tty_pty.c#2 integrate .. //depot/projects/bdb/sys/kern/tty_subr.c#2 integrate .. //depot/projects/bdb/sys/kern/tty_tty.c#2 integrate .. //depot/projects/bdb/sys/kern/uipc_domain.c#2 integrate .. //depot/projects/bdb/sys/kern/uipc_socket.c#2 integrate .. //depot/projects/bdb/sys/kern/vfs_acl.c#2 integrate .. //depot/projects/bdb/sys/kern/vfs_bio.c#2 integrate .. //depot/projects/bdb/sys/kern/vfs_cache.c#2 integrate .. //depot/projects/bdb/sys/kern/vfs_hash.c#2 integrate .. //depot/projects/bdb/sys/kern/vfs_lookup.c#2 integrate .. //depot/projects/bdb/sys/kern/vfs_subr.c#2 integrate .. //depot/projects/bdb/sys/net/bpf.c#2 integrate .. //depot/projects/bdb/sys/net/ieee8023ad_lacp.c#2 integrate .. //depot/projects/bdb/sys/net/ieee8023ad_lacp.h#2 integrate .. //depot/projects/bdb/sys/net/if.c#3 integrate .. //depot/projects/bdb/sys/net/if_lagg.c#2 integrate .. //depot/projects/bdb/sys/net/netisr.c#2 integrate .. //depot/projects/bdb/sys/net/rtsock.c#2 integrate .. //depot/projects/bdb/sys/netatm/ipatm/ipatm_load.c#2 integrate .. //depot/projects/bdb/sys/netatm/sigpvc/sigpvc_if.c#2 integrate .. //depot/projects/bdb/sys/netatm/spans/spans_if.c#2 integrate .. //depot/projects/bdb/sys/netatm/uni/uni_load.c#2 integrate .. //depot/projects/bdb/sys/netinet/ip_ipsec.c#2 integrate .. //depot/projects/bdb/sys/netinet6/ip6_ipsec.c#2 integrate .. //depot/projects/bdb/sys/netinet6/ip6_ipsec.h#2 integrate .. //depot/projects/bdb/sys/netinet6/ip6_output.c#2 integrate .. //depot/projects/bdb/sys/netipsec/ipsec.c#2 integrate .. //depot/projects/bdb/sys/netipsec/ipsec_output.c#2 integrate .. //depot/projects/bdb/sys/netipsec/key.c#2 integrate .. //depot/projects/bdb/sys/nfsclient/nfs_diskless.c#2 integrate .. //depot/projects/bdb/sys/pc98/include/nexusvar.h#1 branch .. //depot/projects/bdb/sys/pc98/pc98/machdep.c#3 integrate .. //depot/projects/bdb/sys/powerpc/aim/machdep.c#3 integrate .. //depot/projects/bdb/sys/powerpc/booke/machdep.c#2 integrate .. //depot/projects/bdb/sys/powerpc/booke/vm_machdep.c#2 integrate .. //depot/projects/bdb/sys/powerpc/powerpc/intr_machdep.c#3 integrate .. //depot/projects/bdb/sys/security/audit/audit.c#2 integrate .. //depot/projects/bdb/sys/sparc64/sparc64/intr_machdep.c#2 integrate .. //depot/projects/bdb/sys/sparc64/sparc64/vm_machdep.c#2 integrate .. //depot/projects/bdb/sys/sun4v/sun4v/intr_machdep.c#2 integrate .. //depot/projects/bdb/sys/sys/bus_dma.h#2 integrate .. //depot/projects/bdb/sys/sys/eventhandler.h#2 integrate .. //depot/projects/bdb/sys/sys/interrupt.h#2 integrate .. //depot/projects/bdb/sys/sys/kernel.h#2 integrate .. //depot/projects/bdb/sys/sys/module.h#2 integrate .. //depot/projects/bdb/sys/sys/rwlock.h#2 integrate .. //depot/projects/bdb/sys/sys/taskqueue.h#2 integrate .. //depot/projects/bdb/sys/ufs/ffs/ffs_softdep.c#3 integrate .. //depot/projects/bdb/sys/vm/vm_fault.c#3 integrate .. //depot/projects/bdb/sys/vm/vm_glue.c#3 integrate .. //depot/projects/bdb/sys/vm/vm_init.c#2 integrate .. //depot/projects/bdb/sys/vm/vm_mmap.c#2 integrate .. //depot/projects/bdb/sys/vm/vm_pageout.c#2 integrate .. //depot/projects/bdb/sys/vm/vm_zeroidle.c#2 integrate .. //depot/projects/bdb/tools/tools/editing/freebsd.vim#1 branch .. //depot/projects/bdb/usr.bin/Makefile#2 integrate .. //depot/projects/bdb/usr.bin/split/split.1#2 integrate .. //depot/projects/bdb/usr.bin/split/split.c#2 integrate .. //depot/projects/bdb/usr.bin/tar/bsdtar.1#2 integrate .. //depot/projects/bdb/usr.bin/tar/bsdtar.c#2 integrate .. //depot/projects/bdb/usr.bin/tar/bsdtar.h#2 integrate .. //depot/projects/bdb/usr.bin/tar/config_freebsd.h#2 integrate .. //depot/projects/bdb/usr.bin/tar/read.c#2 integrate .. //depot/projects/bdb/usr.bin/tar/write.c#2 integrate .. //depot/projects/bdb/usr.bin/uuidgen/Makefile#2 delete .. //depot/projects/bdb/usr.bin/uuidgen/uuidgen.1#2 delete .. //depot/projects/bdb/usr.bin/uuidgen/uuidgen.c#2 delete .. //depot/projects/bdb/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c#3 integrate .. //depot/projects/bdb/usr.sbin/mixer/Makefile#2 integrate .. //depot/projects/bdb/usr.sbin/mixer/mixer.8#2 integrate .. //depot/projects/bdb/usr.sbin/mixer/mixer.c#2 integrate Differences ... ==== //depot/projects/bdb/ObsoleteFiles.inc#3 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.132 2008/03/08 21:59:43 antoine Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.133 2008/03/13 18:17:46 brueffer Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -27,6 +27,8 @@ # 20071207: Merged with fortunes-o.real OLD_FILES+=usr/share/games/fortune/fortunes2-o OLD_FILES+=usr/share/games/fortune/fortunes2-o.dat +# 20071201: Removal of XRPU driver +OLD_FILES+=usr/include/sys/xrpuio.h # 20071129: Disabled static versions of libkse by default .if ${DEFAULT_THREAD_LIB} != "libkse" && ${MK_LIBTHR} != "no" OLD_FILES+=usr/lib/libkse.a ==== //depot/projects/bdb/bin/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # From: @(#)Makefile 8.1 (Berkeley) 5/31/93 -# $FreeBSD: src/bin/Makefile,v 1.26 2006/03/17 18:54:20 ru Exp $ +# $FreeBSD: src/bin/Makefile,v 1.27 2008/03/13 17:38:06 obrien Exp $ .include @@ -37,7 +37,8 @@ sleep \ stty \ sync \ - test + test \ + uuidgen .if ${MK_RCMDS} != "no" _rcp= rcp ==== //depot/projects/bdb/bin/uuidgen/Makefile#2 (text+ko) ==== @@ -1,6 +1,4 @@ -# $FreeBSD: src/bin/uuidgen/Makefile,v 1.3 2007/04/09 19:16:48 pjd Exp $ - -BINDIR= /bin +# $FreeBSD: src/bin/uuidgen/Makefile,v 1.4 2008/03/13 17:38:06 obrien Exp $ PROG= uuidgen WARNS?= 6 ==== //depot/projects/bdb/lib/libarchive/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libarchive/Makefile,v 1.80 2008/01/23 05:48:07 kientzle Exp $ +# $FreeBSD: src/lib/libarchive/Makefile,v 1.82 2008/03/14 23:00:53 kientzle Exp $ LIB= archive DPADD= ${LIBBZ2} ${LIBZ} @@ -81,6 +81,7 @@ archive_write_open_filename.c \ archive_write_open_memory.c \ archive_write_set_compression_bzip2.c \ + archive_write_set_compression_compress.c \ archive_write_set_compression_gzip.c \ archive_write_set_compression_none.c \ archive_write_set_compression_program.c \ @@ -120,6 +121,8 @@ MLINKS+= archive_entry.3 archive_entry_copy_gname.3 MLINKS+= archive_entry.3 archive_entry_copy_gname_w.3 MLINKS+= archive_entry.3 archive_entry_copy_hardlink_w.3 +MLINKS+= archive_entry.3 archive_entry_copy_link.3 +MLINKS+= archive_entry.3 archive_entry_copy_link_w.3 MLINKS+= archive_entry.3 archive_entry_copy_pathname_w.3 MLINKS+= archive_entry.3 archive_entry_copy_stat.3 MLINKS+= archive_entry.3 archive_entry_copy_symlink_w.3 ==== //depot/projects/bdb/lib/libarchive/archive.h.in#2 (text+ko) ==== @@ -22,18 +22,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.47 2007/12/30 04:58:21 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.49 2008/03/14 22:19:50 kientzle Exp $ */ #ifndef ARCHIVE_H_INCLUDED #define ARCHIVE_H_INCLUDED -/* - * This header file corresponds to: - * Library version @ARCHIVE_VERSION@ - * Shared library version @SHLIB_MAJOR@ - */ - #include /* Linux requires this for off_t */ @ARCHIVE_H_INCLUDE_INTTYPES_H@ #include /* For FILE * */ @@ -51,58 +45,59 @@ #endif /* - * Each of the version identifiers comes as a macro and a function. + * The version number is provided as both a macro and a function. * The macro identifies the installed header; the function identifies * the library version (which may not be the same if you're using a * dynamically-linked version of the library). */ /* - * Textual name/version of the library, useful for version displays. - */ -#define ARCHIVE_LIBRARY_VERSION "libarchive @LIBARCHIVE_VERSION_STRING@" -const char * archive_version(void); - -/* - * The "version stamp" is a single integer that makes it easy to check - * the exact version: for version a.b.c, the version stamp is - * printf("%d%03d%03d",a,b,c). For example, version 2.12.108 has - * version stamp 2012108. + * The version number is expressed as a single integer that makes it + * easy to compare versions at build time: for version a.b.c, the + * version number is printf("%d%03d%03d",a,b,c). For example, if you + * know your application requires version 2.12.108 or later, you can + * assert that ARCHIVE_VERSION >= 2012108. * - * This was introduced with libarchive 1.9.0 in the libarchive 1.x family - * and libarchive 2.2.4 in the libarchive 2.x family. The following - * may be useful if you really want to do feature detection for earlier - * libarchive versions (which defined API_VERSION and API_FEATURE): + * This single-number format was introduced with libarchive 1.9.0 in + * the libarchive 1.x family and libarchive 2.2.4 in the libarchive + * 2.x family. The following may be useful if you really want to do + * feature detection for earlier libarchive versions (which defined + * ARCHIVE_API_VERSION and ARCHIVE_API_FEATURE instead): * - * #ifndef ARCHIVE_VERSION_STAMP - * #define ARCHIVE_VERSION_STAMP \ + * #ifndef ARCHIVE_VERSION_NUMBER + * #define ARCHIVE_VERSION_NUMBER \ * (ARCHIVE_API_VERSION * 1000000 + ARCHIVE_API_FEATURE * 1000) * #endif */ -#define ARCHIVE_VERSION_STAMP @LIBARCHIVE_VERSION@ -int archive_version_stamp(void); +#define ARCHIVE_VERSION_NUMBER @LIBARCHIVE_VERSION@ +int archive_version_number(void); /* - * Major version number: If ARCHIVE_API_VERSION != - * archive_api_version(), then the library you were linked with is - * using an incompatible API to the one you were compiled with. This - * is almost certainly a fatal problem. - * This is deprecated and will be removed; use ARCHIVE_VERSION_STAMP - * instead. + * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_API_VERSION (ARCHIVE_VERSION_STAMP / 1000000) -int archive_api_version(void); +const char * archive_version_string(void); +#if ARCHIVE_VERSION_NUMBER < 3000000 /* - * Minor version number. This is deprecated and will be removed. - * Use ARCHIVE_VERSION_STAMP to adapt to libarchive API variations. + * Deprecated; these are older names that will be removed in favor of + * the simpler definitions above. */ -#define ARCHIVE_API_FEATURE ((ARCHIVE_VERSION_STAMP / 1000) % 1000) +#define ARCHIVE_VERSION_STAMP ARCHIVE_VERSION_NUMBER +int archive_version_stamp(void); +#define ARCHIVE_LIBRARY_VERSION "libarchive @LIBARCHIVE_VERSION_STRING@" +const char * archive_version(void); +#define ARCHIVE_API_VERSION (ARCHIVE_VERSION_NUMBER / 1000000) +int archive_api_version(void); +#define ARCHIVE_API_FEATURE ((ARCHIVE_VERSION_NUMBER / 1000) % 1000) int archive_api_feature(void); +#endif - +#if ARCHIVE_VERSION_NUMBER < 3000000 +/* This should never have been here in the first place. */ +/* Legacy of old tar assumptions, will be removed in libarchive 3.0. */ #define ARCHIVE_BYTES_PER_RECORD 512 #define ARCHIVE_DEFAULT_BYTES_PER_BLOCK 10240 +#endif /* Declare our basic types. */ struct archive; @@ -119,6 +114,7 @@ #define ARCHIVE_WARN (-20) /* Partial success. */ /* For example, if write_header "fails", then you can't push data. */ #define ARCHIVE_FAILED (-25) /* Current operation cannot complete. */ +/* But if write_header is "fatal," then this archive is dead and useless. */ #define ARCHIVE_FATAL (-30) /* No more operations are possible. */ /* @@ -146,7 +142,7 @@ typedef ssize_t archive_read_callback(struct archive *, void *_client_data, const void **_buffer); /* Skips at most request bytes from archive and returns the skipped amount */ -#if ARCHIVE_API_VERSION < 2 +#if ARCHIVE_VERSION_NUMBER < 2000000 typedef ssize_t archive_skip_callback(struct archive *, void *_client_data, size_t request); #else @@ -370,7 +366,7 @@ int archive_read_close(struct archive *); /* Release all resources and destroy the object. */ /* Note that archive_read_finish will call archive_read_close for you. */ -#if ARCHIVE_API_VERSION > 1 +#if ARCHIVE_VERSION_NUMBER >= 2000000 int archive_read_finish(struct archive *); #else /* Temporarily allow library to compile with either 1.x or 2.0 API. */ @@ -407,6 +403,7 @@ int archive_write_set_skip_file(struct archive *, dev_t, ino_t); int archive_write_set_compression_bzip2(struct archive *); +int archive_write_set_compression_compress(struct archive *); int archive_write_set_compression_gzip(struct archive *); int archive_write_set_compression_none(struct archive *); int archive_write_set_compression_program(struct archive *, @@ -445,7 +442,7 @@ */ int archive_write_header(struct archive *, struct archive_entry *); -#if ARCHIVE_API_VERSION > 1 +#if ARCHIVE_VERSION_NUMBER >= 2000000 ssize_t archive_write_data(struct archive *, const void *, size_t); #else /* Temporarily allow library to compile with either 1.x or 2.0 API. */ @@ -455,7 +452,7 @@ ssize_t archive_write_data_block(struct archive *, const void *, size_t, off_t); int archive_write_finish_entry(struct archive *); int archive_write_close(struct archive *); -#if ARCHIVE_API_VERSION > 1 +#if ARCHIVE_VERSION_NUMBER >= 2000000 int archive_write_finish(struct archive *); #else /* Temporarily allow library to compile with either 1.x or 2.0 API. */ ==== //depot/projects/bdb/lib/libarchive/archive_entry.3#3 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libarchive/archive_entry.3,v 1.16 2008/03/10 14:44:40 jkoshy Exp $ +.\" $FreeBSD: src/lib/libarchive/archive_entry.3,v 1.17 2008/03/14 23:00:53 kientzle Exp $ .\" .Dd December 15, 2003 .Dt archive_entry 3 @@ -45,6 +45,8 @@ .Nm archive_entry_copy_gname_w , .Nm archive_entry_copy_hardlink , .Nm archive_entry_copy_hardlink_w , +.Nm archive_entry_copy_link , +.Nm archive_entry_copy_link_w , .Nm archive_entry_copy_pathname_w , .Nm archive_entry_copy_stat , .Nm archive_entry_copy_symlink , ==== //depot/projects/bdb/lib/libarchive/archive_entry.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.47 2008/03/12 04:47:37 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.51 2008/03/14 23:19:46 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -207,6 +207,8 @@ static const wchar_t * aes_get_wcs(struct aes *aes) { + int r; + if (aes->aes_wcs == NULL && aes->aes_mbs == NULL) return NULL; if (aes->aes_wcs == NULL && aes->aes_mbs != NULL) { @@ -221,8 +223,13 @@ aes->aes_wcs = aes->aes_wcs_alloc; if (aes->aes_wcs == NULL) __archive_errx(1, "No memory for aes_get_wcs()"); - mbstowcs(aes->aes_wcs_alloc, aes->aes_mbs, wcs_length); + r = mbstowcs(aes->aes_wcs_alloc, aes->aes_mbs, wcs_length); aes->aes_wcs_alloc[wcs_length] = 0; + if (r == -1) { + /* Conversion failed, don't lie to our clients. */ + free(aes->aes_wcs_alloc); + aes->aes_wcs = aes->aes_wcs_alloc = NULL; + } } return (aes->aes_wcs); } @@ -307,6 +314,8 @@ struct archive_entry * archive_entry_clear(struct archive_entry *entry) { + if (entry == NULL) + return (NULL); aes_clean(&entry->ae_fflags_text); aes_clean(&entry->ae_gname); aes_clean(&entry->ae_hardlink); @@ -752,7 +761,29 @@ aes_set_mbs(&entry->ae_hardlink, target); } +/* Set symlink if symlink is already set, else set hardlink. */ void +archive_entry_copy_link(struct archive_entry *entry, const char *target) +{ + if (entry->ae_symlink.aes_mbs != NULL || + entry->ae_symlink.aes_wcs != NULL) + aes_copy_mbs(&entry->ae_symlink, target); + else + aes_copy_mbs(&entry->ae_hardlink, target); +} + +/* Set symlink if symlink is already set, else set hardlink. */ +void +archive_entry_copy_link_w(struct archive_entry *entry, const wchar_t *target) +{ + if (entry->ae_symlink.aes_mbs != NULL || + entry->ae_symlink.aes_wcs != NULL) + aes_copy_wcs(&entry->ae_symlink, target); + else + aes_copy_wcs(&entry->ae_hardlink, target); +} + +void archive_entry_set_mode(struct archive_entry *entry, mode_t m) { entry->stat_valid = 0; @@ -1148,7 +1179,7 @@ archive_entry_acl_text_w(struct archive_entry *entry, int flags) { int count; - int length; + size_t length; const wchar_t *wname; const wchar_t *prefix; wchar_t separator; ==== //depot/projects/bdb/lib/libarchive/archive_entry.h#2 (text+ko) ==== @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libarchive/archive_entry.h,v 1.24 2007/12/30 04:58:21 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/archive_entry.h,v 1.26 2008/03/14 23:00:53 kientzle Exp $ */ #ifndef ARCHIVE_ENTRY_H_INCLUDED @@ -57,7 +57,25 @@ struct archive_entry; /* - * File-type constants. These are returned from archive_entry_filetype(). + * File-type constants. These are returned from archive_entry_filetype() + * and passed to archive_entry_set_filetype(). + * + * These values match S_XXX defines on every platform I've checked, + * including Windows, AIX, Linux, Solaris, and BSD. They're + * (re)defined here because platforms generally don't define the ones + * they don't support. For example, Windows doesn't define S_IFLNK or + * S_IFBLK. Instead of having a mass of conditional logic and system + * checks to define any S_XXX values that aren't supported locally, + * I've just defined a new set of such constants so that + * libarchive-based applications can manipulate and identify archive + * entries properly even if the hosting platform can't store them on + * disk. + * + * These values are also used directly within some portable formats, + * such as cpio. If you find a platform that varies from these, the + * correct solution is to leave these alone and translate from these + * portable values to platform-native values when entries are read from + * or written to disk. */ #define AE_IFMT 0170000 #define AE_IFREG 0100000 @@ -91,7 +109,8 @@ dev_t archive_entry_devminor(struct archive_entry *); mode_t archive_entry_filetype(struct archive_entry *); void archive_entry_fflags(struct archive_entry *, - unsigned long *set, unsigned long *clear); + unsigned long * /* set */, + unsigned long * /* clear */); const char *archive_entry_fflags_text(struct archive_entry *); gid_t archive_entry_gid(struct archive_entry *); const char *archive_entry_gname(struct archive_entry *); @@ -130,7 +149,7 @@ void archive_entry_set_devminor(struct archive_entry *, dev_t); void archive_entry_set_filetype(struct archive_entry *, unsigned int); void archive_entry_set_fflags(struct archive_entry *, - unsigned long set, unsigned long clear); + unsigned long /* set */, unsigned long /* clear */); /* Returns pointer to start of first invalid token, or NULL if none. */ /* Note that all recognized tokens are processed, regardless. */ const wchar_t *archive_entry_copy_fflags_text_w(struct archive_entry *, @@ -144,6 +163,8 @@ void archive_entry_copy_hardlink_w(struct archive_entry *, const wchar_t *); void archive_entry_set_ino(struct archive_entry *, unsigned long); void archive_entry_set_link(struct archive_entry *, const char *); +void archive_entry_copy_link(struct archive_entry *, const char *); +void archive_entry_copy_link_w(struct archive_entry *, const wchar_t *); void archive_entry_set_mode(struct archive_entry *, mode_t); void archive_entry_set_mtime(struct archive_entry *, time_t, long); void archive_entry_set_nlink(struct archive_entry *, unsigned int); @@ -182,6 +203,13 @@ * = there are many different ACL text formats * = would like to be able to read/convert archives containing ACLs * on platforms that lack ACL libraries + * + * This last point, in particular, forces me to implement a reasonably + * complete set of ACL support routines. + * + * TODO: Extend this to support NFSv4/NTFS permissions. That should + * allow full ACL support on Mac OS, in particular, which uses + * POSIX.1e-style interfaces to manipulate NFSv4/NTFS permissions. */ /* @@ -216,21 +244,24 @@ */ void archive_entry_acl_clear(struct archive_entry *); void archive_entry_acl_add_entry(struct archive_entry *, - int type, int permset, int tag, int qual, const char *name); + int /* type */, int /* permset */, int /* tag */, + int /* qual */, const char * /* name */); void archive_entry_acl_add_entry_w(struct archive_entry *, - int type, int permset, int tag, int qual, const wchar_t *name); + int /* type */, int /* permset */, int /* tag */, + int /* qual */, const wchar_t * /* name */); /* * To retrieve the ACL, first "reset", then repeatedly ask for the * "next" entry. The want_type parameter allows you to request only * access entries or only default entries. */ -int archive_entry_acl_reset(struct archive_entry *, int want_type); -int archive_entry_acl_next(struct archive_entry *, int want_type, - int *type, int *permset, int *tag, int *qual, const char **name); -int archive_entry_acl_next_w(struct archive_entry *, int want_type, - int *type, int *permset, int *tag, int *qual, - const wchar_t **name); +int archive_entry_acl_reset(struct archive_entry *, int /* want_type */); +int archive_entry_acl_next(struct archive_entry *, int /* want_type */, + int * /* type */, int * /* permset */, int * /* tag */, + int * /* qual */, const char ** /* name */); +int archive_entry_acl_next_w(struct archive_entry *, int /* want_type */, + int * /* type */, int * /* permset */, int * /* tag */, + int * /* qual */, const wchar_t ** /* name */); /* * Construct a text-format ACL. The flags argument is a bitmask that @@ -245,10 +276,11 @@ */ #define ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID 1024 #define ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT 2048 -const wchar_t *archive_entry_acl_text_w(struct archive_entry *, int flags); +const wchar_t *archive_entry_acl_text_w(struct archive_entry *, + int /* flags */); /* Return a count of entries matching 'want_type' */ -int archive_entry_acl_count(struct archive_entry *, int want_type); +int archive_entry_acl_count(struct archive_entry *, int /* want_type */); /* * Private ACL parser. This is private because it handles some @@ -259,9 +291,12 @@ * this interface are likely to be surprised when it changes. * * You were warned! + * + * TODO: Move this declaration out of the public header and into + * a private header. Warnings above are silly. */ int __archive_entry_acl_parse_w(struct archive_entry *, - const wchar_t *, int type); + const wchar_t *, int /* type */); /* * extended attributes @@ -269,7 +304,8 @@ void archive_entry_xattr_clear(struct archive_entry *); void archive_entry_xattr_add_entry(struct archive_entry *, - const char *name, const void *value, size_t size); + const char * /* name */, const void * /* value */, + size_t /* size */); /* * To retrieve the xattr list, first "reset", then repeatedly ask for the @@ -279,7 +315,7 @@ int archive_entry_xattr_count(struct archive_entry *); int archive_entry_xattr_reset(struct archive_entry *); int archive_entry_xattr_next(struct archive_entry *, - const char **name, const void **value, size_t *); + const char ** /* name */, const void ** /* value */, size_t *); /* * Utility to detect hardlinks. ==== //depot/projects/bdb/lib/libarchive/archive_read_private.h#3 (text+ko) ==== @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libarchive/archive_read_private.h,v 1.5 2008/03/12 04:58:32 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/archive_read_private.h,v 1.6 2008/03/15 11:09:16 kientzle Exp $ */ #ifndef ARCHIVE_READ_PRIVATE_H_INCLUDED @@ -93,17 +93,10 @@ /* * Format detection is mostly the same as compression - * detection, with two significant differences: The bidders + * detection, with one significant difference: The bidders * use the read_ahead calls above to examine the stream rather * than having the supervisor hand them a block of data to - * examine, and the auction is repeated for every header. - * Winning bidders should set the archive_format and - * archive_format_name appropriately. Bid routines should - * check archive_format and decline to bid if the format of - * the last header was incompatible. - * - * Again, write support is considerably simpler because there's - * no need for an auction. + * examine. */ struct archive_format_descriptor { ==== //depot/projects/bdb/lib/libarchive/archive_read_support_format_mtree.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.2 2008/02/19 06:07:10 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.4 2008/03/15 11:02:47 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -76,12 +76,18 @@ struct mtree_entry *this_entry; struct archive_string current_dir; struct archive_string contents_name; + + off_t cur_size, cur_offset; }; static int cleanup(struct archive_read *); static int mtree_bid(struct archive_read *); +static int parse_file(struct archive_read *, struct archive_entry *, + struct mtree *, struct mtree_entry *); static void parse_escapes(char *, struct mtree_entry *); -static int parse_setting(struct archive_read *, struct mtree *, +static int parse_line(struct archive_read *, struct archive_entry *, + struct mtree *, struct mtree_entry *); +static int parse_keyword(struct archive_read *, struct mtree *, struct archive_entry *, char *, char *); static int read_data(struct archive_read *a, const void **buff, size_t *size, off_t *offset); @@ -252,14 +258,16 @@ } } +/* + * Read in the entire mtree file into memory on the first request. + * Then use the next unused file to satisfy each header request. + */ static int read_header(struct archive_read *a, struct archive_entry *entry) { - struct stat st; struct mtree *mtree; - struct mtree_entry *mentry, *mentry2; - char *p, *q; - int r = ARCHIVE_OK, r1; + char *p; + int r; mtree = (struct mtree *)(a->format->data); @@ -278,16 +286,10 @@ a->archive.archive_format_name = mtree->archive_format_name; for (;;) { - mentry = mtree->this_entry; - if (mentry == NULL) { - mtree->this_entry = NULL; + if (mtree->this_entry == NULL) return (ARCHIVE_EOF); - } - mtree->this_entry = mentry->next; - if (mentry->used) - continue; - mentry->used = 1; - if (strcmp(mentry->name, "..") == 0) { + if (strcmp(mtree->this_entry->name, "..") == 0) { + mtree->this_entry->used = 1; if (archive_strlen(&mtree->current_dir) > 0) { /* Roll back current path. */ p = mtree->current_dir.s @@ -299,117 +301,165 @@ mtree->current_dir.length = p - mtree->current_dir.s + 1; } - continue; + } + if (!mtree->this_entry->used) { + r = parse_file(a, entry, mtree, mtree->this_entry); + return (r); } + mtree->this_entry = mtree->this_entry->next; + } +} + +/* + * A single file can have multiple lines contribute specifications. + * Parse as many lines as necessary, then pull additional information + * from a backing file on disk as necessary. + */ +static int +parse_file(struct archive_read *a, struct archive_entry *entry, + struct mtree *mtree, struct mtree_entry *mentry) +{ + struct stat st; + struct mtree_entry *mp; + int r = ARCHIVE_OK, r1; - mtree->filetype = AE_IFREG; + mentry->used = 1; - /* Parse options. */ - p = mentry->option_start; - while (p < mentry->option_end) { - q = p + strlen(p); - r1 = parse_setting(a, mtree, entry, p, q); - if (r1 != ARCHIVE_OK) - r = r1; - p = q + 1; - } + /* Initialize reasonable defaults. */ + mtree->filetype = AE_IFREG; + archive_entry_set_size(entry, 0); - if (mentry->full) { - archive_entry_copy_pathname(entry, mentry->name); - /* - * "Full" entries are allowed to have multiple - * lines and those lines aren't required to be - * adjacent. We don't support multiple lines - * for "relative" entries nor do we make any - * attempt to merge data from separate - * "relative" and "full" entries. (Merging - * "relative" and "full" entries would require - * dealing with pathname canonicalization, - * which is a very tricky subject.) - */ - mentry2 = mentry->next; - while (mentry2 != NULL) { - if (mentry2->full - && !mentry2->used - && strcmp(mentry->name, mentry2->name) == 0) { - /* - * Add those options as well; - * later lines override - * earlier ones. - */ - p = mentry2->option_start; - while (p < mentry2->option_end) { - q = p + strlen(p); - r1 = parse_setting(a, mtree, entry, p, q); - if (r1 != ARCHIVE_OK) - r = r1; - p = q + 1; - } - mentry2->used = 1; - } - mentry2 = mentry2->next; - } - } else { - /* - * Relative entries require us to construct - * the full path and possibly update the - * current directory. - */ - size_t n = archive_strlen(&mtree->current_dir); - if (n > 0) - archive_strcat(&mtree->current_dir, "/"); - archive_strcat(&mtree->current_dir, mentry->name); - archive_entry_copy_pathname(entry, mtree->current_dir.s); - if (archive_entry_filetype(entry) != AE_IFDIR) - mtree->current_dir.length = n; - } + /* Parse options from this line. */ + r = parse_line(a, entry, mtree, mentry); + if (mentry->full) { + archive_entry_copy_pathname(entry, mentry->name); /* - * Try to open and stat the file to get the real size. - * It would be nice to avoid this here so that getting - * a listing of an mtree wouldn't require opening - * every referenced contents file. But then we - * wouldn't know the actual contents size, so I don't - * see a really viable way around this. (Also, we may - * want to someday pull other unspecified info from - * the contents file on disk.) + * "Full" entries are allowed to have multiple lines + * and those lines aren't required to be adjacent. We + * don't support multiple lines for "relative" entries + * nor do we make any attempt to merge data from + * separate "relative" and "full" entries. (Merging + * "relative" and "full" entries would require dealing + * with pathname canonicalization, which is a very + * tricky subject.) */ - if (archive_strlen(&mtree->contents_name) > 0) { - mtree->fd = open(mtree->contents_name.s, - O_RDONLY | O_BINARY); - if (mtree->fd < 0) { - archive_set_error(&a->archive, errno, - "Can't open content=\"%s\"", - mtree->contents_name.s); - r = ARCHIVE_WARN; + for (mp = mentry->next; mp != NULL; mp = mp->next) { + if (mp->full && !mp->used + && strcmp(mentry->name, mp->name) == 0) { + /* Later lines override earlier ones. */ + mp->used = 1; + r1 = parse_line(a, entry, mtree, mp); + if (r1 < r) + r = r1; } - } else { - /* If the specified path opens, use it. */ - mtree->fd = open(mtree->current_dir.s, - O_RDONLY | O_BINARY); - /* But don't fail if it's not there. */ } - + } else { /* - * If there is a contents file on disk, use that size; - * otherwise leave it as-is (it might have been set from - * the mtree size= keyword). + * Relative entries require us to construct + * the full path and possibly update the + * current directory. */ - if (mtree->fd >= 0) { - fstat(mtree->fd, &st); + size_t n = archive_strlen(&mtree->current_dir); + if (n > 0) + archive_strcat(&mtree->current_dir, "/"); + archive_strcat(&mtree->current_dir, mentry->name); + archive_entry_copy_pathname(entry, mtree->current_dir.s); + if (archive_entry_filetype(entry) != AE_IFDIR) + mtree->current_dir.length = n; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Mar 16 20:54:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 52FD51065678; Sun, 16 Mar 2008 20:54:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9C88106566C for ; Sun, 16 Mar 2008 20:54:03 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D43468FC17 for ; Sun, 16 Mar 2008 20:54:03 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GKs3VS061210 for ; Sun, 16 Mar 2008 20:54:03 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GKs3JU061208 for perforce@freebsd.org; Sun, 16 Mar 2008 20:54:03 GMT (envelope-from marcel@freebsd.org) Date: Sun, 16 Mar 2008 20:54:03 GMT Message-Id: <200803162054.m2GKs3JU061208@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 137861 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 20:54:04 -0000 http://perforce.freebsd.org/chv.cgi?CH=137861 Change 137861 by marcel@marcel_xcllnt on 2008/03/16 20:53:50 IFC @137859 Affected files ... .. //depot/projects/powerpc/ObsoleteFiles.inc#17 integrate .. //depot/projects/powerpc/bin/Makefile#2 integrate .. //depot/projects/powerpc/bin/uuidgen/Makefile#2 integrate .. //depot/projects/powerpc/lib/libarchive/Makefile#12 integrate .. //depot/projects/powerpc/lib/libarchive/archive.h.in#11 integrate .. //depot/projects/powerpc/lib/libarchive/archive_entry.3#7 integrate .. //depot/projects/powerpc/lib/libarchive/archive_entry.c#10 integrate .. //depot/projects/powerpc/lib/libarchive/archive_entry.h#7 integrate .. //depot/projects/powerpc/lib/libarchive/archive_read_private.h#6 integrate .. //depot/projects/powerpc/lib/libarchive/archive_read_support_format_mtree.c#3 integrate .. //depot/projects/powerpc/lib/libarchive/archive_read_support_format_tar.c#13 integrate .. //depot/projects/powerpc/lib/libarchive/archive_string.h#4 integrate .. //depot/projects/powerpc/lib/libarchive/archive_string_sprintf.c#4 integrate .. //depot/projects/powerpc/lib/libarchive/archive_util.c#7 integrate .. //depot/projects/powerpc/lib/libarchive/archive_write.c#5 integrate .. //depot/projects/powerpc/lib/libarchive/archive_write_disk.c#10 integrate .. //depot/projects/powerpc/lib/libarchive/archive_write_private.h#3 integrate .. //depot/projects/powerpc/lib/libarchive/archive_write_set_compression_compress.c#1 branch .. //depot/projects/powerpc/lib/libarchive/archive_write_set_format_ar.c#6 integrate .. //depot/projects/powerpc/lib/libarchive/archive_write_set_format_cpio.c#7 integrate .. //depot/projects/powerpc/lib/libarchive/archive_write_set_format_cpio_newc.c#4 integrate .. //depot/projects/powerpc/lib/libarchive/archive_write_set_format_pax.c#7 integrate .. //depot/projects/powerpc/lib/libarchive/archive_write_set_format_shar.c#5 integrate .. //depot/projects/powerpc/lib/libarchive/archive_write_set_format_ustar.c#9 integrate .. //depot/projects/powerpc/lib/libarchive/config_freebsd.h#6 integrate .. //depot/projects/powerpc/lib/libarchive/test/.cvsignore#1 branch .. //depot/projects/powerpc/lib/libarchive/test/Makefile#10 integrate .. //depot/projects/powerpc/lib/libarchive/test/test_archive_api_feature.c#4 integrate .. //depot/projects/powerpc/lib/libarchive/test/test_empty_write.c#2 integrate .. //depot/projects/powerpc/lib/libarchive/test/test_entry.c#4 integrate .. //depot/projects/powerpc/lib/libarchive/test/test_pax_filename_encoding.c#1 branch .. //depot/projects/powerpc/lib/libarchive/test/test_pax_filename_encoding.tar.gz.uu#1 branch .. //depot/projects/powerpc/lib/libarchive/test/test_write_compress.c#1 branch .. //depot/projects/powerpc/lib/libc/gen/scandir.c#3 integrate .. //depot/projects/powerpc/lib/libc/gen/sem_timedwait.3#2 integrate .. //depot/projects/powerpc/lib/libc/gen/sem_wait.3#3 integrate .. //depot/projects/powerpc/lib/libc/sys/kldunload.2#3 integrate .. //depot/projects/powerpc/lib/libpmc/pmc.3#6 integrate .. //depot/projects/powerpc/lib/libthr/thread/thr_create.c#4 integrate .. //depot/projects/powerpc/release/doc/en_US.ISO8859-1/relnotes/article.sgml#16 integrate .. //depot/projects/powerpc/sbin/atacontrol/atacontrol.c#4 integrate .. //depot/projects/powerpc/sbin/geom/class/multipath/gmultipath.8#4 integrate .. //depot/projects/powerpc/share/examples/cvsup/cvs-supfile#5 integrate .. //depot/projects/powerpc/share/man/man9/Makefile#13 integrate .. //depot/projects/powerpc/share/man/man9/rwlock.9#4 integrate .. //depot/projects/powerpc/share/man/man9/stack.9#2 integrate .. //depot/projects/powerpc/sys/amd64/acpica/acpi_machdep.c#2 integrate .. //depot/projects/powerpc/sys/amd64/acpica/madt.c#5 integrate .. //depot/projects/powerpc/sys/amd64/amd64/intr_machdep.c#8 integrate .. //depot/projects/powerpc/sys/amd64/amd64/legacy.c#5 integrate .. //depot/projects/powerpc/sys/amd64/amd64/local_apic.c#7 integrate .. //depot/projects/powerpc/sys/amd64/amd64/machdep.c#13 integrate .. //depot/projects/powerpc/sys/amd64/amd64/mptable.c#4 integrate .. //depot/projects/powerpc/sys/amd64/amd64/nexus.c#7 integrate .. //depot/projects/powerpc/sys/amd64/ia32/ia32_signal.c#2 integrate .. //depot/projects/powerpc/sys/amd64/include/intr_machdep.h#6 integrate .. //depot/projects/powerpc/sys/amd64/include/nexusvar.h#1 branch .. //depot/projects/powerpc/sys/amd64/isa/atpic.c#4 integrate .. //depot/projects/powerpc/sys/amd64/linux32/linux32_proto.h#6 integrate .. //depot/projects/powerpc/sys/amd64/linux32/linux32_syscall.h#6 integrate .. //depot/projects/powerpc/sys/amd64/linux32/linux32_sysent.c#6 integrate .. //depot/projects/powerpc/sys/amd64/linux32/linux32_sysvec.c#8 integrate .. //depot/projects/powerpc/sys/amd64/linux32/syscalls.master#6 integrate .. //depot/projects/powerpc/sys/arm/arm/intr.c#6 integrate .. //depot/projects/powerpc/sys/arm/arm/machdep.c#5 integrate .. //depot/projects/powerpc/sys/arm/arm/vm_machdep.c#8 integrate .. //depot/projects/powerpc/sys/boot/uboot/Makefile#2 integrate .. //depot/projects/powerpc/sys/boot/uboot/common/main.c#2 integrate .. //depot/projects/powerpc/sys/boot/uboot/lib/Makefile#2 integrate .. //depot/projects/powerpc/sys/boot/uboot/lib/api_public.h#2 integrate .. //depot/projects/powerpc/sys/boot/uboot/lib/copy.c#3 integrate .. //depot/projects/powerpc/sys/boot/uboot/lib/devicename.c#2 integrate .. //depot/projects/powerpc/sys/boot/uboot/lib/disk.c#2 integrate .. //depot/projects/powerpc/sys/boot/uboot/lib/elf_freebsd.c#2 integrate .. //depot/projects/powerpc/sys/boot/uboot/lib/glue.c#3 integrate .. //depot/projects/powerpc/sys/boot/uboot/lib/glue.h#2 integrate .. //depot/projects/powerpc/sys/boot/uboot/lib/libuboot.h#3 integrate .. //depot/projects/powerpc/sys/boot/uboot/lib/module.c#2 integrate .. //depot/projects/powerpc/sys/boot/uboot/lib/net.c#3 integrate .. //depot/projects/powerpc/sys/boot/uboot/lib/reboot.c#2 integrate .. //depot/projects/powerpc/sys/compat/linux/linux_misc.c#14 integrate .. //depot/projects/powerpc/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#7 integrate .. //depot/projects/powerpc/sys/contrib/opensolaris/uts/common/os/callb.c#2 integrate .. //depot/projects/powerpc/sys/contrib/opensolaris/uts/common/os/taskq.c#2 integrate .. //depot/projects/powerpc/sys/dev/aac/aac.c#11 integrate .. //depot/projects/powerpc/sys/dev/acpica/acpi.c#14 integrate .. //depot/projects/powerpc/sys/dev/acpica/acpivar.h#10 integrate .. //depot/projects/powerpc/sys/dev/hwpmc/pmc_events.h#2 integrate .. //depot/projects/powerpc/sys/dev/ofw/ofw_console.c#6 integrate .. //depot/projects/powerpc/sys/dev/syscons/sysmouse.c#5 integrate .. //depot/projects/powerpc/sys/dev/tdfx/tdfx_pci.c#5 integrate .. //depot/projects/powerpc/sys/dev/usb/usb_quirks.c#8 integrate .. //depot/projects/powerpc/sys/dev/usb/usbdevs#19 integrate .. //depot/projects/powerpc/sys/gdb/gdb_cons.c#2 integrate .. //depot/projects/powerpc/sys/i386/acpica/acpi_machdep.c#6 integrate .. //depot/projects/powerpc/sys/i386/acpica/acpi_wakeup.c#5 integrate .. //depot/projects/powerpc/sys/i386/acpica/madt.c#6 integrate .. //depot/projects/powerpc/sys/i386/i386/intr_machdep.c#8 integrate .. //depot/projects/powerpc/sys/i386/i386/k6_mem.c#5 integrate .. //depot/projects/powerpc/sys/i386/i386/legacy.c#5 integrate .. //depot/projects/powerpc/sys/i386/i386/local_apic.c#7 integrate .. //depot/projects/powerpc/sys/i386/i386/machdep.c#17 integrate .. //depot/projects/powerpc/sys/i386/i386/mp_machdep.c#15 integrate .. //depot/projects/powerpc/sys/i386/i386/mptable.c#4 integrate .. //depot/projects/powerpc/sys/i386/i386/nexus.c#9 integrate .. //depot/projects/powerpc/sys/i386/i386/vm_machdep.c#12 integrate .. //depot/projects/powerpc/sys/i386/include/intr_machdep.h#6 integrate .. //depot/projects/powerpc/sys/i386/include/nexusvar.h#4 branch .. //depot/projects/powerpc/sys/i386/isa/atpic.c#4 integrate .. //depot/projects/powerpc/sys/i386/linux/linux_proto.h#9 integrate .. //depot/projects/powerpc/sys/i386/linux/linux_syscall.h#9 integrate .. //depot/projects/powerpc/sys/i386/linux/linux_sysent.c#9 integrate .. //depot/projects/powerpc/sys/i386/linux/linux_sysvec.c#8 integrate .. //depot/projects/powerpc/sys/i386/linux/syscalls.master#9 integrate .. //depot/projects/powerpc/sys/i386/svr4/svr4_machdep.c#5 integrate .. //depot/projects/powerpc/sys/i386/xbox/xbox.c#2 integrate .. //depot/projects/powerpc/sys/ia64/ia64/interrupt.c#10 integrate .. //depot/projects/powerpc/sys/ia64/ia64/machdep.c#16 integrate .. //depot/projects/powerpc/sys/ia64/ia64/nexus.c#6 integrate .. //depot/projects/powerpc/sys/ia64/ia64/sscdisk.c#5 integrate .. //depot/projects/powerpc/sys/ia64/isa/isa_dma.c#5 integrate .. //depot/projects/powerpc/sys/kern/init_main.c#15 integrate .. //depot/projects/powerpc/sys/kern/kern_alq.c#6 integrate .. //depot/projects/powerpc/sys/kern/kern_clock.c#14 integrate .. //depot/projects/powerpc/sys/kern/kern_descrip.c#18 integrate .. //depot/projects/powerpc/sys/kern/kern_event.c#11 integrate .. //depot/projects/powerpc/sys/kern/kern_idle.c#8 integrate .. //depot/projects/powerpc/sys/kern/kern_intr.c#14 integrate .. //depot/projects/powerpc/sys/kern/kern_linker.c#11 integrate .. //depot/projects/powerpc/sys/kern/kern_malloc.c#9 integrate .. //depot/projects/powerpc/sys/kern/kern_mbuf.c#9 integrate .. //depot/projects/powerpc/sys/kern/kern_module.c#8 integrate .. //depot/projects/powerpc/sys/kern/kern_ntptime.c#8 integrate .. //depot/projects/powerpc/sys/kern/kern_poll.c#5 integrate .. //depot/projects/powerpc/sys/kern/kern_resource.c#15 integrate .. //depot/projects/powerpc/sys/kern/kern_shutdown.c#11 integrate .. //depot/projects/powerpc/sys/kern/kern_switch.c#12 integrate .. //depot/projects/powerpc/sys/kern/kern_synch.c#15 integrate .. //depot/projects/powerpc/sys/kern/kern_tc.c#7 integrate .. //depot/projects/powerpc/sys/kern/link_elf.c#9 integrate .. //depot/projects/powerpc/sys/kern/link_elf_obj.c#5 integrate .. //depot/projects/powerpc/sys/kern/sched_4bsd.c#14 integrate .. //depot/projects/powerpc/sys/kern/sched_ule.c#16 integrate .. //depot/projects/powerpc/sys/kern/subr_autoconf.c#5 integrate .. //depot/projects/powerpc/sys/kern/subr_eventhandler.c#5 integrate .. //depot/projects/powerpc/sys/kern/subr_log.c#5 integrate .. //depot/projects/powerpc/sys/kern/subr_prof.c#8 integrate .. //depot/projects/powerpc/sys/kern/subr_smp.c#11 integrate .. //depot/projects/powerpc/sys/kern/subr_witness.c#19 integrate .. //depot/projects/powerpc/sys/kern/tty_cons.c#7 integrate .. //depot/projects/powerpc/sys/kern/tty_pts.c#4 integrate .. //depot/projects/powerpc/sys/kern/tty_pty.c#10 integrate .. //depot/projects/powerpc/sys/kern/tty_subr.c#4 integrate .. //depot/projects/powerpc/sys/kern/tty_tty.c#6 integrate .. //depot/projects/powerpc/sys/kern/uipc_domain.c#6 integrate .. //depot/projects/powerpc/sys/kern/uipc_socket.c#13 integrate .. //depot/projects/powerpc/sys/kern/vfs_acl.c#4 integrate .. //depot/projects/powerpc/sys/kern/vfs_bio.c#17 integrate .. //depot/projects/powerpc/sys/kern/vfs_cache.c#13 integrate .. //depot/projects/powerpc/sys/kern/vfs_hash.c#3 integrate .. //depot/projects/powerpc/sys/kern/vfs_lookup.c#13 integrate .. //depot/projects/powerpc/sys/kern/vfs_subr.c#18 integrate .. //depot/projects/powerpc/sys/net/bpf.c#12 integrate .. //depot/projects/powerpc/sys/net/ieee8023ad_lacp.c#7 integrate .. //depot/projects/powerpc/sys/net/ieee8023ad_lacp.h#6 integrate .. //depot/projects/powerpc/sys/net/if.c#13 integrate .. //depot/projects/powerpc/sys/net/if_lagg.c#10 integrate .. //depot/projects/powerpc/sys/net/netisr.c#3 integrate .. //depot/projects/powerpc/sys/net/rtsock.c#7 integrate .. //depot/projects/powerpc/sys/netatm/ipatm/ipatm_load.c#4 integrate .. //depot/projects/powerpc/sys/netatm/sigpvc/sigpvc_if.c#4 integrate .. //depot/projects/powerpc/sys/netatm/spans/spans_if.c#4 integrate .. //depot/projects/powerpc/sys/netatm/uni/uni_load.c#4 integrate .. //depot/projects/powerpc/sys/netinet/ip_ipsec.c#6 integrate .. //depot/projects/powerpc/sys/netinet6/ip6_ipsec.c#4 integrate .. //depot/projects/powerpc/sys/netinet6/ip6_ipsec.h#4 integrate .. //depot/projects/powerpc/sys/netinet6/ip6_output.c#10 integrate .. //depot/projects/powerpc/sys/netipsec/ipsec.c#9 integrate .. //depot/projects/powerpc/sys/netipsec/ipsec_output.c#6 integrate .. //depot/projects/powerpc/sys/netipsec/key.c#5 integrate .. //depot/projects/powerpc/sys/nfsclient/nfs_diskless.c#3 integrate .. //depot/projects/powerpc/sys/pc98/include/nexusvar.h#1 branch .. //depot/projects/powerpc/sys/pc98/pc98/machdep.c#13 integrate .. //depot/projects/powerpc/sys/powerpc/aim/machdep.c#8 integrate .. //depot/projects/powerpc/sys/powerpc/booke/machdep.c#4 integrate .. //depot/projects/powerpc/sys/powerpc/booke/vm_machdep.c#3 integrate .. //depot/projects/powerpc/sys/powerpc/powerpc/intr_machdep.c#10 integrate .. //depot/projects/powerpc/sys/security/audit/audit.c#11 integrate .. //depot/projects/powerpc/sys/sparc64/sparc64/intr_machdep.c#9 integrate .. //depot/projects/powerpc/sys/sparc64/sparc64/vm_machdep.c#8 integrate .. //depot/projects/powerpc/sys/sun4v/sun4v/intr_machdep.c#5 integrate .. //depot/projects/powerpc/sys/sys/bus_dma.h#2 integrate .. //depot/projects/powerpc/sys/sys/eventhandler.h#8 integrate .. //depot/projects/powerpc/sys/sys/interrupt.h#9 integrate .. //depot/projects/powerpc/sys/sys/kernel.h#9 integrate .. //depot/projects/powerpc/sys/sys/module.h#6 integrate .. //depot/projects/powerpc/sys/sys/rwlock.h#7 integrate .. //depot/projects/powerpc/sys/sys/taskqueue.h#4 integrate .. //depot/projects/powerpc/sys/ufs/ffs/ffs_softdep.c#14 integrate .. //depot/projects/powerpc/sys/vm/vm_fault.c#14 integrate .. //depot/projects/powerpc/sys/vm/vm_glue.c#11 integrate .. //depot/projects/powerpc/sys/vm/vm_init.c#4 integrate .. //depot/projects/powerpc/sys/vm/vm_mmap.c#11 integrate .. //depot/projects/powerpc/sys/vm/vm_pageout.c#12 integrate .. //depot/projects/powerpc/sys/vm/vm_zeroidle.c#11 integrate .. //depot/projects/powerpc/tools/tools/editing/freebsd.vim#1 branch .. //depot/projects/powerpc/usr.bin/Makefile#9 integrate .. //depot/projects/powerpc/usr.bin/split/split.1#2 integrate .. //depot/projects/powerpc/usr.bin/split/split.c#2 integrate .. //depot/projects/powerpc/usr.bin/tar/bsdtar.1#6 integrate .. //depot/projects/powerpc/usr.bin/tar/bsdtar.c#9 integrate .. //depot/projects/powerpc/usr.bin/tar/bsdtar.h#6 integrate .. //depot/projects/powerpc/usr.bin/tar/config_freebsd.h#3 integrate .. //depot/projects/powerpc/usr.bin/tar/read.c#10 integrate .. //depot/projects/powerpc/usr.bin/tar/write.c#10 integrate .. //depot/projects/powerpc/usr.bin/uuidgen/Makefile#3 delete .. //depot/projects/powerpc/usr.bin/uuidgen/uuidgen.1#2 delete .. //depot/projects/powerpc/usr.bin/uuidgen/uuidgen.c#2 delete .. //depot/projects/powerpc/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c#3 integrate .. //depot/projects/powerpc/usr.sbin/mixer/Makefile#2 integrate .. //depot/projects/powerpc/usr.sbin/mixer/mixer.8#3 integrate .. //depot/projects/powerpc/usr.sbin/mixer/mixer.c#2 integrate Differences ... ==== //depot/projects/powerpc/ObsoleteFiles.inc#17 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.132 2008/03/08 21:59:43 antoine Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.133 2008/03/13 18:17:46 brueffer Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -27,6 +27,8 @@ # 20071207: Merged with fortunes-o.real OLD_FILES+=usr/share/games/fortune/fortunes2-o OLD_FILES+=usr/share/games/fortune/fortunes2-o.dat +# 20071201: Removal of XRPU driver +OLD_FILES+=usr/include/sys/xrpuio.h # 20071129: Disabled static versions of libkse by default .if ${DEFAULT_THREAD_LIB} != "libkse" && ${MK_LIBTHR} != "no" OLD_FILES+=usr/lib/libkse.a ==== //depot/projects/powerpc/bin/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ # From: @(#)Makefile 8.1 (Berkeley) 5/31/93 -# $FreeBSD: src/bin/Makefile,v 1.26 2006/03/17 18:54:20 ru Exp $ +# $FreeBSD: src/bin/Makefile,v 1.27 2008/03/13 17:38:06 obrien Exp $ .include @@ -37,7 +37,8 @@ sleep \ stty \ sync \ - test + test \ + uuidgen .if ${MK_RCMDS} != "no" _rcp= rcp ==== //depot/projects/powerpc/bin/uuidgen/Makefile#2 (text+ko) ==== @@ -1,6 +1,4 @@ -# $FreeBSD: src/bin/uuidgen/Makefile,v 1.3 2007/04/09 19:16:48 pjd Exp $ - -BINDIR= /bin +# $FreeBSD: src/bin/uuidgen/Makefile,v 1.4 2008/03/13 17:38:06 obrien Exp $ PROG= uuidgen WARNS?= 6 ==== //depot/projects/powerpc/lib/libarchive/Makefile#12 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/lib/libarchive/Makefile,v 1.80 2008/01/23 05:48:07 kientzle Exp $ +# $FreeBSD: src/lib/libarchive/Makefile,v 1.82 2008/03/14 23:00:53 kientzle Exp $ LIB= archive DPADD= ${LIBBZ2} ${LIBZ} @@ -81,6 +81,7 @@ archive_write_open_filename.c \ archive_write_open_memory.c \ archive_write_set_compression_bzip2.c \ + archive_write_set_compression_compress.c \ archive_write_set_compression_gzip.c \ archive_write_set_compression_none.c \ archive_write_set_compression_program.c \ @@ -120,6 +121,8 @@ MLINKS+= archive_entry.3 archive_entry_copy_gname.3 MLINKS+= archive_entry.3 archive_entry_copy_gname_w.3 MLINKS+= archive_entry.3 archive_entry_copy_hardlink_w.3 +MLINKS+= archive_entry.3 archive_entry_copy_link.3 +MLINKS+= archive_entry.3 archive_entry_copy_link_w.3 MLINKS+= archive_entry.3 archive_entry_copy_pathname_w.3 MLINKS+= archive_entry.3 archive_entry_copy_stat.3 MLINKS+= archive_entry.3 archive_entry_copy_symlink_w.3 ==== //depot/projects/powerpc/lib/libarchive/archive.h.in#11 (text+ko) ==== @@ -22,18 +22,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.47 2007/12/30 04:58:21 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/archive.h.in,v 1.49 2008/03/14 22:19:50 kientzle Exp $ */ #ifndef ARCHIVE_H_INCLUDED #define ARCHIVE_H_INCLUDED -/* - * This header file corresponds to: - * Library version @ARCHIVE_VERSION@ - * Shared library version @SHLIB_MAJOR@ - */ - #include /* Linux requires this for off_t */ @ARCHIVE_H_INCLUDE_INTTYPES_H@ #include /* For FILE * */ @@ -51,58 +45,59 @@ #endif /* - * Each of the version identifiers comes as a macro and a function. + * The version number is provided as both a macro and a function. * The macro identifies the installed header; the function identifies * the library version (which may not be the same if you're using a * dynamically-linked version of the library). */ /* - * Textual name/version of the library, useful for version displays. - */ -#define ARCHIVE_LIBRARY_VERSION "libarchive @LIBARCHIVE_VERSION_STRING@" -const char * archive_version(void); - -/* - * The "version stamp" is a single integer that makes it easy to check - * the exact version: for version a.b.c, the version stamp is - * printf("%d%03d%03d",a,b,c). For example, version 2.12.108 has - * version stamp 2012108. + * The version number is expressed as a single integer that makes it + * easy to compare versions at build time: for version a.b.c, the + * version number is printf("%d%03d%03d",a,b,c). For example, if you + * know your application requires version 2.12.108 or later, you can + * assert that ARCHIVE_VERSION >= 2012108. * - * This was introduced with libarchive 1.9.0 in the libarchive 1.x family - * and libarchive 2.2.4 in the libarchive 2.x family. The following - * may be useful if you really want to do feature detection for earlier - * libarchive versions (which defined API_VERSION and API_FEATURE): + * This single-number format was introduced with libarchive 1.9.0 in + * the libarchive 1.x family and libarchive 2.2.4 in the libarchive + * 2.x family. The following may be useful if you really want to do + * feature detection for earlier libarchive versions (which defined + * ARCHIVE_API_VERSION and ARCHIVE_API_FEATURE instead): * - * #ifndef ARCHIVE_VERSION_STAMP - * #define ARCHIVE_VERSION_STAMP \ + * #ifndef ARCHIVE_VERSION_NUMBER + * #define ARCHIVE_VERSION_NUMBER \ * (ARCHIVE_API_VERSION * 1000000 + ARCHIVE_API_FEATURE * 1000) * #endif */ -#define ARCHIVE_VERSION_STAMP @LIBARCHIVE_VERSION@ -int archive_version_stamp(void); +#define ARCHIVE_VERSION_NUMBER @LIBARCHIVE_VERSION@ +int archive_version_number(void); /* - * Major version number: If ARCHIVE_API_VERSION != - * archive_api_version(), then the library you were linked with is - * using an incompatible API to the one you were compiled with. This - * is almost certainly a fatal problem. - * This is deprecated and will be removed; use ARCHIVE_VERSION_STAMP - * instead. + * Textual name/version of the library, useful for version displays. */ -#define ARCHIVE_API_VERSION (ARCHIVE_VERSION_STAMP / 1000000) -int archive_api_version(void); +const char * archive_version_string(void); +#if ARCHIVE_VERSION_NUMBER < 3000000 /* - * Minor version number. This is deprecated and will be removed. - * Use ARCHIVE_VERSION_STAMP to adapt to libarchive API variations. + * Deprecated; these are older names that will be removed in favor of + * the simpler definitions above. */ -#define ARCHIVE_API_FEATURE ((ARCHIVE_VERSION_STAMP / 1000) % 1000) +#define ARCHIVE_VERSION_STAMP ARCHIVE_VERSION_NUMBER +int archive_version_stamp(void); +#define ARCHIVE_LIBRARY_VERSION "libarchive @LIBARCHIVE_VERSION_STRING@" +const char * archive_version(void); +#define ARCHIVE_API_VERSION (ARCHIVE_VERSION_NUMBER / 1000000) +int archive_api_version(void); +#define ARCHIVE_API_FEATURE ((ARCHIVE_VERSION_NUMBER / 1000) % 1000) int archive_api_feature(void); +#endif - +#if ARCHIVE_VERSION_NUMBER < 3000000 +/* This should never have been here in the first place. */ +/* Legacy of old tar assumptions, will be removed in libarchive 3.0. */ #define ARCHIVE_BYTES_PER_RECORD 512 #define ARCHIVE_DEFAULT_BYTES_PER_BLOCK 10240 +#endif /* Declare our basic types. */ struct archive; @@ -119,6 +114,7 @@ #define ARCHIVE_WARN (-20) /* Partial success. */ /* For example, if write_header "fails", then you can't push data. */ #define ARCHIVE_FAILED (-25) /* Current operation cannot complete. */ +/* But if write_header is "fatal," then this archive is dead and useless. */ #define ARCHIVE_FATAL (-30) /* No more operations are possible. */ /* @@ -146,7 +142,7 @@ typedef ssize_t archive_read_callback(struct archive *, void *_client_data, const void **_buffer); /* Skips at most request bytes from archive and returns the skipped amount */ -#if ARCHIVE_API_VERSION < 2 +#if ARCHIVE_VERSION_NUMBER < 2000000 typedef ssize_t archive_skip_callback(struct archive *, void *_client_data, size_t request); #else @@ -370,7 +366,7 @@ int archive_read_close(struct archive *); /* Release all resources and destroy the object. */ /* Note that archive_read_finish will call archive_read_close for you. */ -#if ARCHIVE_API_VERSION > 1 +#if ARCHIVE_VERSION_NUMBER >= 2000000 int archive_read_finish(struct archive *); #else /* Temporarily allow library to compile with either 1.x or 2.0 API. */ @@ -407,6 +403,7 @@ int archive_write_set_skip_file(struct archive *, dev_t, ino_t); int archive_write_set_compression_bzip2(struct archive *); +int archive_write_set_compression_compress(struct archive *); int archive_write_set_compression_gzip(struct archive *); int archive_write_set_compression_none(struct archive *); int archive_write_set_compression_program(struct archive *, @@ -445,7 +442,7 @@ */ int archive_write_header(struct archive *, struct archive_entry *); -#if ARCHIVE_API_VERSION > 1 +#if ARCHIVE_VERSION_NUMBER >= 2000000 ssize_t archive_write_data(struct archive *, const void *, size_t); #else /* Temporarily allow library to compile with either 1.x or 2.0 API. */ @@ -455,7 +452,7 @@ ssize_t archive_write_data_block(struct archive *, const void *, size_t, off_t); int archive_write_finish_entry(struct archive *); int archive_write_close(struct archive *); -#if ARCHIVE_API_VERSION > 1 +#if ARCHIVE_VERSION_NUMBER >= 2000000 int archive_write_finish(struct archive *); #else /* Temporarily allow library to compile with either 1.x or 2.0 API. */ ==== //depot/projects/powerpc/lib/libarchive/archive_entry.3#7 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libarchive/archive_entry.3,v 1.16 2008/03/10 14:44:40 jkoshy Exp $ +.\" $FreeBSD: src/lib/libarchive/archive_entry.3,v 1.17 2008/03/14 23:00:53 kientzle Exp $ .\" .Dd December 15, 2003 .Dt archive_entry 3 @@ -45,6 +45,8 @@ .Nm archive_entry_copy_gname_w , .Nm archive_entry_copy_hardlink , .Nm archive_entry_copy_hardlink_w , +.Nm archive_entry_copy_link , +.Nm archive_entry_copy_link_w , .Nm archive_entry_copy_pathname_w , .Nm archive_entry_copy_stat , .Nm archive_entry_copy_symlink , ==== //depot/projects/powerpc/lib/libarchive/archive_entry.c#10 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.47 2008/03/12 04:47:37 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.51 2008/03/14 23:19:46 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -207,6 +207,8 @@ static const wchar_t * aes_get_wcs(struct aes *aes) { + int r; + if (aes->aes_wcs == NULL && aes->aes_mbs == NULL) return NULL; if (aes->aes_wcs == NULL && aes->aes_mbs != NULL) { @@ -221,8 +223,13 @@ aes->aes_wcs = aes->aes_wcs_alloc; if (aes->aes_wcs == NULL) __archive_errx(1, "No memory for aes_get_wcs()"); - mbstowcs(aes->aes_wcs_alloc, aes->aes_mbs, wcs_length); + r = mbstowcs(aes->aes_wcs_alloc, aes->aes_mbs, wcs_length); aes->aes_wcs_alloc[wcs_length] = 0; + if (r == -1) { + /* Conversion failed, don't lie to our clients. */ + free(aes->aes_wcs_alloc); + aes->aes_wcs = aes->aes_wcs_alloc = NULL; + } } return (aes->aes_wcs); } @@ -307,6 +314,8 @@ struct archive_entry * archive_entry_clear(struct archive_entry *entry) { + if (entry == NULL) + return (NULL); aes_clean(&entry->ae_fflags_text); aes_clean(&entry->ae_gname); aes_clean(&entry->ae_hardlink); @@ -752,7 +761,29 @@ aes_set_mbs(&entry->ae_hardlink, target); } +/* Set symlink if symlink is already set, else set hardlink. */ void +archive_entry_copy_link(struct archive_entry *entry, const char *target) +{ + if (entry->ae_symlink.aes_mbs != NULL || + entry->ae_symlink.aes_wcs != NULL) + aes_copy_mbs(&entry->ae_symlink, target); + else + aes_copy_mbs(&entry->ae_hardlink, target); +} + +/* Set symlink if symlink is already set, else set hardlink. */ +void +archive_entry_copy_link_w(struct archive_entry *entry, const wchar_t *target) +{ + if (entry->ae_symlink.aes_mbs != NULL || + entry->ae_symlink.aes_wcs != NULL) + aes_copy_wcs(&entry->ae_symlink, target); + else + aes_copy_wcs(&entry->ae_hardlink, target); +} + +void archive_entry_set_mode(struct archive_entry *entry, mode_t m) { entry->stat_valid = 0; @@ -1148,7 +1179,7 @@ archive_entry_acl_text_w(struct archive_entry *entry, int flags) { int count; - int length; + size_t length; const wchar_t *wname; const wchar_t *prefix; wchar_t separator; ==== //depot/projects/powerpc/lib/libarchive/archive_entry.h#7 (text+ko) ==== @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libarchive/archive_entry.h,v 1.24 2007/12/30 04:58:21 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/archive_entry.h,v 1.26 2008/03/14 23:00:53 kientzle Exp $ */ #ifndef ARCHIVE_ENTRY_H_INCLUDED @@ -57,7 +57,25 @@ struct archive_entry; /* - * File-type constants. These are returned from archive_entry_filetype(). + * File-type constants. These are returned from archive_entry_filetype() + * and passed to archive_entry_set_filetype(). + * + * These values match S_XXX defines on every platform I've checked, + * including Windows, AIX, Linux, Solaris, and BSD. They're + * (re)defined here because platforms generally don't define the ones + * they don't support. For example, Windows doesn't define S_IFLNK or + * S_IFBLK. Instead of having a mass of conditional logic and system + * checks to define any S_XXX values that aren't supported locally, + * I've just defined a new set of such constants so that + * libarchive-based applications can manipulate and identify archive + * entries properly even if the hosting platform can't store them on + * disk. + * + * These values are also used directly within some portable formats, + * such as cpio. If you find a platform that varies from these, the + * correct solution is to leave these alone and translate from these + * portable values to platform-native values when entries are read from + * or written to disk. */ #define AE_IFMT 0170000 #define AE_IFREG 0100000 @@ -91,7 +109,8 @@ dev_t archive_entry_devminor(struct archive_entry *); mode_t archive_entry_filetype(struct archive_entry *); void archive_entry_fflags(struct archive_entry *, - unsigned long *set, unsigned long *clear); + unsigned long * /* set */, + unsigned long * /* clear */); const char *archive_entry_fflags_text(struct archive_entry *); gid_t archive_entry_gid(struct archive_entry *); const char *archive_entry_gname(struct archive_entry *); @@ -130,7 +149,7 @@ void archive_entry_set_devminor(struct archive_entry *, dev_t); void archive_entry_set_filetype(struct archive_entry *, unsigned int); void archive_entry_set_fflags(struct archive_entry *, - unsigned long set, unsigned long clear); + unsigned long /* set */, unsigned long /* clear */); /* Returns pointer to start of first invalid token, or NULL if none. */ /* Note that all recognized tokens are processed, regardless. */ const wchar_t *archive_entry_copy_fflags_text_w(struct archive_entry *, @@ -144,6 +163,8 @@ void archive_entry_copy_hardlink_w(struct archive_entry *, const wchar_t *); void archive_entry_set_ino(struct archive_entry *, unsigned long); void archive_entry_set_link(struct archive_entry *, const char *); +void archive_entry_copy_link(struct archive_entry *, const char *); +void archive_entry_copy_link_w(struct archive_entry *, const wchar_t *); void archive_entry_set_mode(struct archive_entry *, mode_t); void archive_entry_set_mtime(struct archive_entry *, time_t, long); void archive_entry_set_nlink(struct archive_entry *, unsigned int); @@ -182,6 +203,13 @@ * = there are many different ACL text formats * = would like to be able to read/convert archives containing ACLs * on platforms that lack ACL libraries + * + * This last point, in particular, forces me to implement a reasonably + * complete set of ACL support routines. + * + * TODO: Extend this to support NFSv4/NTFS permissions. That should + * allow full ACL support on Mac OS, in particular, which uses + * POSIX.1e-style interfaces to manipulate NFSv4/NTFS permissions. */ /* @@ -216,21 +244,24 @@ */ void archive_entry_acl_clear(struct archive_entry *); void archive_entry_acl_add_entry(struct archive_entry *, - int type, int permset, int tag, int qual, const char *name); + int /* type */, int /* permset */, int /* tag */, + int /* qual */, const char * /* name */); void archive_entry_acl_add_entry_w(struct archive_entry *, - int type, int permset, int tag, int qual, const wchar_t *name); + int /* type */, int /* permset */, int /* tag */, + int /* qual */, const wchar_t * /* name */); /* * To retrieve the ACL, first "reset", then repeatedly ask for the * "next" entry. The want_type parameter allows you to request only * access entries or only default entries. */ -int archive_entry_acl_reset(struct archive_entry *, int want_type); -int archive_entry_acl_next(struct archive_entry *, int want_type, - int *type, int *permset, int *tag, int *qual, const char **name); -int archive_entry_acl_next_w(struct archive_entry *, int want_type, - int *type, int *permset, int *tag, int *qual, - const wchar_t **name); +int archive_entry_acl_reset(struct archive_entry *, int /* want_type */); +int archive_entry_acl_next(struct archive_entry *, int /* want_type */, + int * /* type */, int * /* permset */, int * /* tag */, + int * /* qual */, const char ** /* name */); +int archive_entry_acl_next_w(struct archive_entry *, int /* want_type */, + int * /* type */, int * /* permset */, int * /* tag */, + int * /* qual */, const wchar_t ** /* name */); /* * Construct a text-format ACL. The flags argument is a bitmask that @@ -245,10 +276,11 @@ */ #define ARCHIVE_ENTRY_ACL_STYLE_EXTRA_ID 1024 #define ARCHIVE_ENTRY_ACL_STYLE_MARK_DEFAULT 2048 -const wchar_t *archive_entry_acl_text_w(struct archive_entry *, int flags); +const wchar_t *archive_entry_acl_text_w(struct archive_entry *, + int /* flags */); /* Return a count of entries matching 'want_type' */ -int archive_entry_acl_count(struct archive_entry *, int want_type); +int archive_entry_acl_count(struct archive_entry *, int /* want_type */); /* * Private ACL parser. This is private because it handles some @@ -259,9 +291,12 @@ * this interface are likely to be surprised when it changes. * * You were warned! + * + * TODO: Move this declaration out of the public header and into + * a private header. Warnings above are silly. */ int __archive_entry_acl_parse_w(struct archive_entry *, - const wchar_t *, int type); + const wchar_t *, int /* type */); /* * extended attributes @@ -269,7 +304,8 @@ void archive_entry_xattr_clear(struct archive_entry *); void archive_entry_xattr_add_entry(struct archive_entry *, - const char *name, const void *value, size_t size); + const char * /* name */, const void * /* value */, + size_t /* size */); /* * To retrieve the xattr list, first "reset", then repeatedly ask for the @@ -279,7 +315,7 @@ int archive_entry_xattr_count(struct archive_entry *); int archive_entry_xattr_reset(struct archive_entry *); int archive_entry_xattr_next(struct archive_entry *, - const char **name, const void **value, size_t *); + const char ** /* name */, const void ** /* value */, size_t *); /* * Utility to detect hardlinks. ==== //depot/projects/powerpc/lib/libarchive/archive_read_private.h#6 (text+ko) ==== @@ -22,7 +22,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/lib/libarchive/archive_read_private.h,v 1.5 2008/03/12 04:58:32 kientzle Exp $ + * $FreeBSD: src/lib/libarchive/archive_read_private.h,v 1.6 2008/03/15 11:09:16 kientzle Exp $ */ #ifndef ARCHIVE_READ_PRIVATE_H_INCLUDED @@ -93,17 +93,10 @@ /* * Format detection is mostly the same as compression - * detection, with two significant differences: The bidders + * detection, with one significant difference: The bidders * use the read_ahead calls above to examine the stream rather * than having the supervisor hand them a block of data to - * examine, and the auction is repeated for every header. - * Winning bidders should set the archive_format and - * archive_format_name appropriately. Bid routines should - * check archive_format and decline to bid if the format of - * the last header was incompatible. - * - * Again, write support is considerably simpler because there's - * no need for an auction. + * examine. */ struct archive_format_descriptor { ==== //depot/projects/powerpc/lib/libarchive/archive_read_support_format_mtree.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.2 2008/02/19 06:07:10 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_support_format_mtree.c,v 1.4 2008/03/15 11:02:47 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -76,12 +76,18 @@ struct mtree_entry *this_entry; struct archive_string current_dir; struct archive_string contents_name; + + off_t cur_size, cur_offset; }; static int cleanup(struct archive_read *); static int mtree_bid(struct archive_read *); +static int parse_file(struct archive_read *, struct archive_entry *, + struct mtree *, struct mtree_entry *); static void parse_escapes(char *, struct mtree_entry *); -static int parse_setting(struct archive_read *, struct mtree *, +static int parse_line(struct archive_read *, struct archive_entry *, + struct mtree *, struct mtree_entry *); +static int parse_keyword(struct archive_read *, struct mtree *, struct archive_entry *, char *, char *); static int read_data(struct archive_read *a, const void **buff, size_t *size, off_t *offset); @@ -252,14 +258,16 @@ } } +/* + * Read in the entire mtree file into memory on the first request. + * Then use the next unused file to satisfy each header request. + */ static int read_header(struct archive_read *a, struct archive_entry *entry) { - struct stat st; struct mtree *mtree; - struct mtree_entry *mentry, *mentry2; - char *p, *q; - int r = ARCHIVE_OK, r1; + char *p; + int r; mtree = (struct mtree *)(a->format->data); @@ -278,16 +286,10 @@ a->archive.archive_format_name = mtree->archive_format_name; for (;;) { - mentry = mtree->this_entry; - if (mentry == NULL) { - mtree->this_entry = NULL; + if (mtree->this_entry == NULL) return (ARCHIVE_EOF); - } - mtree->this_entry = mentry->next; - if (mentry->used) - continue; - mentry->used = 1; - if (strcmp(mentry->name, "..") == 0) { + if (strcmp(mtree->this_entry->name, "..") == 0) { + mtree->this_entry->used = 1; if (archive_strlen(&mtree->current_dir) > 0) { /* Roll back current path. */ p = mtree->current_dir.s @@ -299,117 +301,165 @@ mtree->current_dir.length = p - mtree->current_dir.s + 1; } - continue; + } + if (!mtree->this_entry->used) { + r = parse_file(a, entry, mtree, mtree->this_entry); + return (r); } + mtree->this_entry = mtree->this_entry->next; + } +} + +/* + * A single file can have multiple lines contribute specifications. + * Parse as many lines as necessary, then pull additional information + * from a backing file on disk as necessary. + */ +static int +parse_file(struct archive_read *a, struct archive_entry *entry, + struct mtree *mtree, struct mtree_entry *mentry) +{ + struct stat st; + struct mtree_entry *mp; + int r = ARCHIVE_OK, r1; - mtree->filetype = AE_IFREG; + mentry->used = 1; - /* Parse options. */ - p = mentry->option_start; - while (p < mentry->option_end) { - q = p + strlen(p); - r1 = parse_setting(a, mtree, entry, p, q); - if (r1 != ARCHIVE_OK) - r = r1; - p = q + 1; - } + /* Initialize reasonable defaults. */ + mtree->filetype = AE_IFREG; + archive_entry_set_size(entry, 0); - if (mentry->full) { - archive_entry_copy_pathname(entry, mentry->name); - /* - * "Full" entries are allowed to have multiple - * lines and those lines aren't required to be - * adjacent. We don't support multiple lines - * for "relative" entries nor do we make any - * attempt to merge data from separate - * "relative" and "full" entries. (Merging - * "relative" and "full" entries would require - * dealing with pathname canonicalization, - * which is a very tricky subject.) - */ - mentry2 = mentry->next; - while (mentry2 != NULL) { - if (mentry2->full - && !mentry2->used - && strcmp(mentry->name, mentry2->name) == 0) { - /* - * Add those options as well; - * later lines override - * earlier ones. - */ - p = mentry2->option_start; - while (p < mentry2->option_end) { - q = p + strlen(p); - r1 = parse_setting(a, mtree, entry, p, q); - if (r1 != ARCHIVE_OK) - r = r1; - p = q + 1; - } - mentry2->used = 1; - } - mentry2 = mentry2->next; - } - } else { - /* - * Relative entries require us to construct - * the full path and possibly update the - * current directory. - */ - size_t n = archive_strlen(&mtree->current_dir); - if (n > 0) - archive_strcat(&mtree->current_dir, "/"); - archive_strcat(&mtree->current_dir, mentry->name); - archive_entry_copy_pathname(entry, mtree->current_dir.s); - if (archive_entry_filetype(entry) != AE_IFDIR) - mtree->current_dir.length = n; - } + /* Parse options from this line. */ + r = parse_line(a, entry, mtree, mentry); + if (mentry->full) { + archive_entry_copy_pathname(entry, mentry->name); /* - * Try to open and stat the file to get the real size. - * It would be nice to avoid this here so that getting - * a listing of an mtree wouldn't require opening - * every referenced contents file. But then we - * wouldn't know the actual contents size, so I don't - * see a really viable way around this. (Also, we may - * want to someday pull other unspecified info from - * the contents file on disk.) + * "Full" entries are allowed to have multiple lines + * and those lines aren't required to be adjacent. We + * don't support multiple lines for "relative" entries + * nor do we make any attempt to merge data from + * separate "relative" and "full" entries. (Merging + * "relative" and "full" entries would require dealing + * with pathname canonicalization, which is a very + * tricky subject.) */ - if (archive_strlen(&mtree->contents_name) > 0) { - mtree->fd = open(mtree->contents_name.s, - O_RDONLY | O_BINARY); - if (mtree->fd < 0) { - archive_set_error(&a->archive, errno, - "Can't open content=\"%s\"", - mtree->contents_name.s); - r = ARCHIVE_WARN; + for (mp = mentry->next; mp != NULL; mp = mp->next) { + if (mp->full && !mp->used + && strcmp(mentry->name, mp->name) == 0) { + /* Later lines override earlier ones. */ + mp->used = 1; + r1 = parse_line(a, entry, mtree, mp); + if (r1 < r) + r = r1; } - } else { - /* If the specified path opens, use it. */ - mtree->fd = open(mtree->current_dir.s, - O_RDONLY | O_BINARY); - /* But don't fail if it's not there. */ } - + } else { /* - * If there is a contents file on disk, use that size; - * otherwise leave it as-is (it might have been set from - * the mtree size= keyword). + * Relative entries require us to construct + * the full path and possibly update the + * current directory. */ - if (mtree->fd >= 0) { - fstat(mtree->fd, &st); + size_t n = archive_strlen(&mtree->current_dir); + if (n > 0) + archive_strcat(&mtree->current_dir, "/"); + archive_strcat(&mtree->current_dir, mentry->name); + archive_entry_copy_pathname(entry, mtree->current_dir.s); + if (archive_entry_filetype(entry) != AE_IFDIR) + mtree->current_dir.length = n; >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Mar 16 21:07:17 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B9ED51065672; Sun, 16 Mar 2008 21:07:17 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 782A8106564A for ; Sun, 16 Mar 2008 21:07:17 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 638878FC17 for ; Sun, 16 Mar 2008 21:07:17 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GL7Hc7063066 for ; Sun, 16 Mar 2008 21:07:17 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GL7Hug063064 for perforce@freebsd.org; Sun, 16 Mar 2008 21:07:17 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Mar 2008 21:07:17 GMT Message-Id: <200803162107.m2GL7Hug063064@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 137862 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 21:07:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=137862 Change 137862 by jb@jb_freebsd8 on 2008/03/16 21:07:13 Regenned files after last IFC. Affected files ... .. //depot/projects/dtrace/src/sys/kern/init_sysent.c#24 edit .. //depot/projects/dtrace/src/sys/kern/syscalls.c#23 edit .. //depot/projects/dtrace/src/sys/kern/systrace_args.c#19 edit .. //depot/projects/dtrace/src/sys/sys/syscall.h#21 edit .. //depot/projects/dtrace/src/sys/sys/syscall.mk#21 edit .. //depot/projects/dtrace/src/sys/sys/sysproto.h#21 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/init_sysent.c#24 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/init_sysent.c,v 1.234 2008/03/02 07:41:10 jeff Exp $ + * $FreeBSD$ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.238 2008/03/02 07:39:22 jeff Exp */ ==== //depot/projects/dtrace/src/sys/kern/syscalls.c#23 (text+ko) ==== @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/syscalls.c,v 1.218 2008/03/02 07:41:10 jeff Exp $ + * $FreeBSD$ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.238 2008/03/02 07:39:22 jeff Exp */ ==== //depot/projects/dtrace/src/sys/kern/systrace_args.c#19 (text+ko) ==== @@ -2,7 +2,7 @@ * System call argument to DTrace register array converstion. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/systrace_args.c,v 1.18 2008/03/02 07:41:10 jeff Exp $ + * $FreeBSD$ * This file is part of the DTrace syscall provider. */ @@ -2940,3 +2940,4816 @@ break; }; } +static void +systrace_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) +{ + const char *p = NULL; + switch (sysnum) { + /* nosys */ + case 0: + break; + /* sys_exit */ + case 1: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* fork */ + case 2: + break; + /* read */ + case 3: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "void *"; + break; + case 2: + p = "size_t"; + break; + default: + break; + }; + break; + /* write */ + case 4: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "const void *"; + break; + case 2: + p = "size_t"; + break; + default: + break; + }; + break; + /* open */ + case 5: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* close */ + case 6: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* wait4 */ + case 7: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "struct rusage *"; + break; + default: + break; + }; + break; + /* link */ + case 9: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char *"; + break; + default: + break; + }; + break; + /* unlink */ + case 10: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* chdir */ + case 12: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* fchdir */ + case 13: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* mknod */ + case 14: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* chmod */ + case 15: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* chown */ + case 16: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* obreak */ + case 17: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* getpid */ + case 20: + break; + /* mount */ + case 21: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char *"; + break; + case 2: + p = "int"; + break; + case 3: + p = "caddr_t"; + break; + default: + break; + }; + break; + /* unmount */ + case 22: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* setuid */ + case 23: + switch(ndx) { + case 0: + p = "uid_t"; + break; + default: + break; + }; + break; + /* getuid */ + case 24: + break; + /* geteuid */ + case 25: + break; + /* ptrace */ + case 26: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "pid_t"; + break; + case 2: + p = "caddr_t"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* recvmsg */ + case 27: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct msghdr *"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* sendmsg */ + case 28: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct msghdr *"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* recvfrom */ + case 29: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "caddr_t"; + break; + case 2: + p = "size_t"; + break; + case 3: + p = "int"; + break; + case 4: + p = "struct sockaddr *__restrict"; + break; + case 5: + p = "__socklen_t *__restrict"; + break; + default: + break; + }; + break; + /* accept */ + case 30: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct sockaddr *__restrict"; + break; + case 2: + p = "__socklen_t *__restrict"; + break; + default: + break; + }; + break; + /* getpeername */ + case 31: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct sockaddr *__restrict"; + break; + case 2: + p = "__socklen_t *__restrict"; + break; + default: + break; + }; + break; + /* getsockname */ + case 32: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct sockaddr *__restrict"; + break; + case 2: + p = "__socklen_t *__restrict"; + break; + default: + break; + }; + break; + /* access */ + case 33: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* chflags */ + case 34: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* fchflags */ + case 35: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* sync */ + case 36: + break; + /* kill */ + case 37: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* getppid */ + case 39: + break; + /* dup */ + case 41: + switch(ndx) { + case 0: + p = "u_int"; + break; + default: + break; + }; + break; + /* pipe */ + case 42: + break; + /* getegid */ + case 43: + break; + /* profil */ + case 44: + switch(ndx) { + case 0: + p = "caddr_t"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "size_t"; + break; + case 3: + p = "u_int"; + break; + default: + break; + }; + break; + /* ktrace */ + case 45: + switch(ndx) { + case 0: + p = "const char *"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; + /* getgid */ + case 47: + break; + /* getlogin */ + case 49: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "u_int"; + break; + default: + break; + }; + break; + /* setlogin */ + case 50: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* acct */ + case 51: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* sigaltstack */ + case 53: + switch(ndx) { + case 0: + p = "stack_t *"; + break; + case 1: + p = "stack_t *"; + break; + default: + break; + }; + break; + /* ioctl */ + case 54: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "u_long"; + break; + case 2: + p = "caddr_t"; + break; + default: + break; + }; + break; + /* reboot */ + case 55: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* revoke */ + case 56: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* symlink */ + case 57: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char *"; + break; + default: + break; + }; + break; + /* readlink */ + case 58: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char *"; + break; + case 2: + p = "size_t"; + break; + default: + break; + }; + break; + /* execve */ + case 59: + switch(ndx) { + case 0: + p = "char *"; + break; + case 1: + p = "char **"; + break; + case 2: + p = "char **"; + break; + default: + break; + }; + break; + /* umask */ + case 60: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* chroot */ + case 61: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* msync */ + case 65: + switch(ndx) { + case 0: + p = "void *"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* vfork */ + case 66: + break; + /* sbrk */ + case 69: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* sstk */ + case 70: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* ovadvise */ + case 72: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* munmap */ + case 73: + switch(ndx) { + case 0: + p = "void *"; + break; + case 1: + p = "size_t"; + break; + default: + break; + }; + break; + /* mprotect */ + case 74: + switch(ndx) { + case 0: + p = "const void *"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* madvise */ + case 75: + switch(ndx) { + case 0: + p = "void *"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* mincore */ + case 78: + switch(ndx) { + case 0: + p = "const void *"; + break; + case 1: + p = "size_t"; + break; + case 2: + p = "char *"; + break; + default: + break; + }; + break; + /* getgroups */ + case 79: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "gid_t *"; + break; + default: + break; + }; + break; + /* setgroups */ + case 80: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "gid_t *"; + break; + default: + break; + }; + break; + /* getpgrp */ + case 81: + break; + /* setpgid */ + case 82: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: + break; + }; + break; + /* setitimer */ + case 83: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "struct itimerval *"; + break; + case 2: + p = "struct itimerval *"; + break; + default: + break; + }; + break; + /* swapon */ + case 85: + switch(ndx) { + case 0: + p = "char *"; + break; + default: + break; + }; + break; + /* getitimer */ + case 86: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "struct itimerval *"; + break; + default: + break; + }; + break; + /* getdtablesize */ + case 89: + break; + /* dup2 */ + case 90: + switch(ndx) { + case 0: + p = "u_int"; + break; + case 1: + p = "u_int"; + break; + default: + break; + }; + break; + /* fcntl */ + case 92: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "long"; + break; + default: + break; + }; + break; + /* select */ + case 93: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "fd_set *"; + break; + case 2: + p = "fd_set *"; + break; + case 3: + p = "fd_set *"; + break; + case 4: + p = "struct timeval *"; + break; + default: + break; + }; + break; + /* fsync */ + case 95: + switch(ndx) { + case 0: + p = "int"; + break; + default: + break; + }; + break; + /* setpriority */ + case 96: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* socket */ + case 97: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* connect */ + case 98: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "caddr_t"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; + /* getpriority */ + case 100: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; + default: >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Mar 16 21:09:22 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4F6211065670; Sun, 16 Mar 2008 21:09:22 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FAEB106564A for ; Sun, 16 Mar 2008 21:09:22 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D59A98FC16 for ; Sun, 16 Mar 2008 21:09:21 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GL9Les063104 for ; Sun, 16 Mar 2008 21:09:21 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GL9LiQ063102 for perforce@freebsd.org; Sun, 16 Mar 2008 21:09:21 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Mar 2008 21:09:21 GMT Message-Id: <200803162109.m2GL9LiQ063102@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 137863 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 21:09:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=137863 Change 137863 by jb@jb_freebsd8 on 2008/03/16 21:08:40 Fix a mismerge. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#6 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#6 (text+ko) ==== @@ -1113,7 +1113,7 @@ int ltype = 0; if (cnp->cn_flags & ISDOTDOT) { - ltype = VOP_ISLOCKED(dvp, td); + ltype = VOP_ISLOCKED(dvp); VOP_UNLOCK(dvp, 0); } error = vn_lock(*vpp, cnp->cn_lkflags); From owner-p4-projects@FreeBSD.ORG Sun Mar 16 21:13:26 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8EF5B1065679; Sun, 16 Mar 2008 21:13:26 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EA311065671 for ; Sun, 16 Mar 2008 21:13:26 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 38E818FC1F for ; Sun, 16 Mar 2008 21:13:26 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GLDQW5063265 for ; Sun, 16 Mar 2008 21:13:26 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GLDQTQ063263 for perforce@freebsd.org; Sun, 16 Mar 2008 21:13:26 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Mar 2008 21:13:26 GMT Message-Id: <200803162113.m2GLDQTQ063263@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 137864 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 21:13:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=137864 Change 137864 by jb@jb_freebsd8 on 2008/03/16 21:12:39 Add a reset mechanism to the double trap handler to cater for those occasions when fbt enables a probe on something that ends up being called unexpectedly from the probe context. We need to reset the probe points so that the double trap is handled properly and we end up back in ddb. In fbt itself, do not instrument functions with names starting with two underscores. There are one or two of these that can cause a double fault when instrumented with fbt, so the simple solution is to avoid doing that. rwatson: this is the "bewm" problem you saw. :-) Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/fbt/fbt.c#9 edit .. //depot/projects/dtrace/src/sys/i386/i386/trap.c#28 edit .. //depot/projects/dtrace/src/sys/sys/dtrace_bsd.h#14 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/fbt/fbt.c#9 (text+ko) ==== @@ -59,6 +59,7 @@ #include #include +#include MALLOC_DEFINE(M_FBT, "fbt", "Function Boundary Tracing"); @@ -147,6 +148,20 @@ static int fbt_probetab_mask; static int fbt_verbose = 0; +static void +fbt_doubletrap(void) +{ + fbt_probe_t *fbt; + int i; + + for (i = 0; i < fbt_probetab_size; i++) { + fbt = fbt_probetab[i]; + + for (; fbt != NULL; fbt = fbt->fbtp_next) + *fbt->fbtp_patchpoint = fbt->fbtp_savedval; + } +} + static int fbt_invop(uintptr_t addr, uintptr_t *stack, uintptr_t rval) { @@ -228,6 +243,9 @@ return (0); } + if (name[0] == '_' && name[1] == '_') + return (0); + size = symval->size; instr = (u_int8_t *) symval->value; @@ -1321,6 +1339,7 @@ fbt_probetab = malloc(fbt_probetab_size * sizeof (fbt_probe_t *), M_FBT, M_WAITOK | M_ZERO); + dtrace_doubletrap_func = fbt_doubletrap; dtrace_invop_add(fbt_invop); if (dtrace_register("fbt", &fbt_attr, DTRACE_PRIV_USER, @@ -1337,6 +1356,8 @@ /* De-register the invalid opcode handler. */ dtrace_invop_remove(fbt_invop); + dtrace_doubletrap_func = NULL; + /* De-register this DTrace provider. */ if ((error = dtrace_unregister(fbt_id)) != 0) return (error); ==== //depot/projects/dtrace/src/sys/i386/i386/trap.c#28 (text+ko) ==== @@ -113,6 +113,8 @@ */ dtrace_trap_func_t dtrace_trap_func; +dtrace_doubletrap_func_t dtrace_doubletrap_func; + /* * This is a hook which is initialised by the systrace module * when it is loaded. This keeps the DTrace syscall provider @@ -952,6 +954,10 @@ void dblfault_handler() { +#ifdef KDTRACE_HOOKS + if (dtrace_doubletrap_func != NULL) + (*dtrace_doubletrap_func)(); +#endif printf("\nFatal double fault:\n"); printf("eip = 0x%x\n", PCPU_GET(common_tss.tss_eip)); printf("esp = 0x%x\n", PCPU_GET(common_tss.tss_esp)); ==== //depot/projects/dtrace/src/sys/sys/dtrace_bsd.h#14 (text+ko) ==== @@ -62,9 +62,11 @@ /* Used by the machine dependent trap() code. */ typedef int (*dtrace_invop_func_t)(uintptr_t, uintptr_t *, uintptr_t); +typedef void (*dtrace_doubletrap_func_t)(void); -/* Global variable in trap.c */ +/* Global variables in trap.c */ extern dtrace_invop_func_t dtrace_invop_func; +extern dtrace_doubletrap_func_t dtrace_doubletrap_func; /* Virtual time hook function type. */ typedef void (*dtrace_vtime_switch_func_t)(struct thread *); From owner-p4-projects@FreeBSD.ORG Sun Mar 16 21:13:27 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EC14D106566B; Sun, 16 Mar 2008 21:13:26 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FB1A1065672 for ; Sun, 16 Mar 2008 21:13:26 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5B6A18FC20 for ; Sun, 16 Mar 2008 21:13:26 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GLDQHk063270 for ; Sun, 16 Mar 2008 21:13:26 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GLDQbo063268 for perforce@freebsd.org; Sun, 16 Mar 2008 21:13:26 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Mar 2008 21:13:26 GMT Message-Id: <200803162113.m2GLDQbo063268@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 137865 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 21:13:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=137865 Change 137865 by jb@jb_freebsd8 on 2008/03/16 21:13:07 Remove some obsolete code. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ioctl.c#21 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_ioctl.c#21 (text+ko) ==== @@ -37,18 +37,6 @@ if (state == NULL) return (EINVAL); -#if defined(__i386__) - /* - * Check if any probe recursions have occurred. These are more - * likely to cause a crash, but let's try to report them if we - * can. - */ - if (dtrace_in_probe_addr != 0) { - printf("dtrace_in_probe_addr 0x%lx\n", (u_long) dtrace_in_probe_addr); - dtrace_in_probe_addr = 0; - } -#endif - if (state->dts_anon) { ASSERT(dtrace_anon.dta_state == NULL); state = state->dts_anon; From owner-p4-projects@FreeBSD.ORG Sun Mar 16 21:16:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 02D4E10656C3; Sun, 16 Mar 2008 21:16:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B66E310656C0 for ; Sun, 16 Mar 2008 21:16:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id A1FE88FC1B for ; Sun, 16 Mar 2008 21:16:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GLGTFT063352 for ; Sun, 16 Mar 2008 21:16:29 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GLGTtn063350 for perforce@freebsd.org; Sun, 16 Mar 2008 21:16:29 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Mar 2008 21:16:29 GMT Message-Id: <200803162116.m2GLGTtn063350@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 137866 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 21:16:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=137866 Change 137866 by jb@jb_freebsd8 on 2008/03/16 21:15:35 Handle double traps on amd64 the same was as on i386 so that the double trap details are printed correctly and we end up in ddb rather than just rebooting. Affected files ... .. //depot/projects/dtrace/src/sys/amd64/amd64/trap.c#23 edit Differences ... ==== //depot/projects/dtrace/src/sys/amd64/amd64/trap.c#23 (text+ko) ==== @@ -105,6 +105,8 @@ */ dtrace_trap_func_t dtrace_trap_func; +dtrace_doubletrap_func_t dtrace_doubletrap_func; + /* * This is a hook which is initialised by the systrace module * when it is loaded. This keeps the DTrace syscall provider @@ -771,6 +773,10 @@ void dblfault_handler(struct trapframe *frame) { +#ifdef KDTRACE_HOOKS + if (dtrace_doubletrap_func != NULL) + (*dtrace_doubletrap_func)(); +#endif printf("\nFatal double fault\n"); printf("rip = 0x%lx\n", frame->tf_rip); printf("rsp = 0x%lx\n", frame->tf_rsp); From owner-p4-projects@FreeBSD.ORG Sun Mar 16 21:54:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5CFB41065674; Sun, 16 Mar 2008 21:54:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19261106567B for ; Sun, 16 Mar 2008 21:54:20 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 010C28FC16 for ; Sun, 16 Mar 2008 21:54:20 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m2GLsJTv069285 for ; Sun, 16 Mar 2008 21:54:19 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2GLsItV069283 for perforce@freebsd.org; Sun, 16 Mar 2008 21:54:18 GMT (envelope-from jb@freebsd.org) Date: Sun, 16 Mar 2008 21:54:18 GMT Message-Id: <200803162154.m2GLsItV069283@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 137875 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Mar 2008 21:54:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=137875 Change 137875 by jb@jb_freebsd8 on 2008/03/16 21:53:26 IFC Affected files ... .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/Makefile#7 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#65 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.committers.sgml#41 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/linux-emulation/article.sgml#2 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/linux-users/Makefile#1 branch .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/linux-users/article.sgml#1 branch .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/handbook/ports/chapter.sgml#12 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/handbook/virtualization/chapter.sgml#4 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml#59 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/share/sgml/authors.ent#33 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/lippe.key#1 branch .. //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys-developers.sgml#33 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys.ent#32 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/rdivacky.key#1 branch .. //depot/projects/dtrace/doc/share/sgml/man-refs.ent#26 integrate .. //depot/projects/dtrace/ports/CHANGES#11 integrate .. //depot/projects/dtrace/ports/LEGAL#36 integrate .. //depot/projects/dtrace/ports/MOVED#69 integrate .. //depot/projects/dtrace/ports/Mk/bsd.commands.mk#2 integrate .. //depot/projects/dtrace/ports/Mk/bsd.database.mk#9 integrate .. //depot/projects/dtrace/ports/Mk/bsd.destdir.mk#2 integrate .. //depot/projects/dtrace/ports/Mk/bsd.efl.mk#2 integrate .. //depot/projects/dtrace/ports/Mk/bsd.port.mk#15 integrate .. //depot/projects/dtrace/ports/Mk/bsd.port.subdir.mk#5 integrate .. //depot/projects/dtrace/ports/Mk/bsd.python.mk#15 integrate .. //depot/projects/dtrace/ports/Mk/bsd.qt.mk#2 integrate .. //depot/projects/dtrace/ports/Mk/bsd.sdl.mk#6 integrate .. //depot/projects/dtrace/ports/Mk/bsd.sites.mk#24 integrate .. //depot/projects/dtrace/ports/Mk/bsd.xorg.mk#3 integrate .. //depot/projects/dtrace/ports/Tools/portbuild/scripts/buildscript#5 integrate .. //depot/projects/dtrace/ports/Tools/portbuild/scripts/makeindex#6 integrate .. //depot/projects/dtrace/ports/Tools/portbuild/scripts/releasemachine#3 integrate .. //depot/projects/dtrace/ports/UIDs#22 integrate .. //depot/projects/dtrace/ports/UPDATING#56 integrate .. //depot/projects/dtrace/src/ObsoleteFiles.inc#39 integrate .. //depot/projects/dtrace/src/UPDATING#27 integrate .. //depot/projects/dtrace/src/bin/Makefile#4 integrate .. //depot/projects/dtrace/src/bin/chflags/chflags.1#5 integrate .. //depot/projects/dtrace/src/bin/chflags/chflags.c#4 integrate .. //depot/projects/dtrace/src/bin/cp/cp.1#8 integrate .. //depot/projects/dtrace/src/bin/cp/cp.c#10 integrate .. //depot/projects/dtrace/src/bin/cp/utils.c#7 integrate .. //depot/projects/dtrace/src/bin/ps/ps.1#6 integrate .. //depot/projects/dtrace/src/bin/realpath/realpath.1#4 integrate .. //depot/projects/dtrace/src/bin/realpath/realpath.c#4 integrate .. //depot/projects/dtrace/src/bin/uuidgen/Makefile#1 branch .. //depot/projects/dtrace/src/bin/uuidgen/uuidgen.1#1 branch .. //depot/projects/dtrace/src/bin/uuidgen/uuidgen.c#1 branch .. //depot/projects/dtrace/src/contrib/tcsh/sh.lex.c#6 integrate .. //depot/projects/dtrace/src/etc/rc.d/mountlate#5 integrate .. //depot/projects/dtrace/src/etc/rc.d/root#6 integrate .. //depot/projects/dtrace/src/lib/Makefile#20 integrate .. //depot/projects/dtrace/src/lib/libalias/libalias/Makefile#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/Makefile#12 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive.h.in#11 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_entry.3#6 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_entry.c#9 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_entry.h#7 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read.3#8 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read.c#11 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_private.h#3 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_format_ar.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_format_mtree.c#3 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_format_tar.c#14 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_string.h#7 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_string_sprintf.c#6 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_util.3#6 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_util.c#8 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write.3#8 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write.c#11 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_disk.3#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_disk.c#6 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_private.h#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_compression_compress.c#1 branch .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_format_ar.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_format_cpio.c#9 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_format_cpio_newc.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_format_pax.c#9 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_format_shar.c#7 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_format_ustar.c#9 integrate .. //depot/projects/dtrace/src/lib/libarchive/config_freebsd.h#5 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/.cvsignore#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/Makefile#5 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/main.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test.h#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_archive_api_feature.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_compat_gtar.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_compat_tar_hardlink.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_compat_zip.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_empty_write.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_entry.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_pax_filename_encoding.c#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_pax_filename_encoding.tar.gz.uu#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_ar.c#2 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_read_format_gtar_sparse.c#3 integrate .. //depot/projects/dtrace/src/lib/libarchive/test/test_write_compress.c#1 branch .. //depot/projects/dtrace/src/lib/libarchive/test/test_write_format_ar.c#2 integrate .. //depot/projects/dtrace/src/lib/libc/gen/Makefile.inc#13 integrate .. //depot/projects/dtrace/src/lib/libc/gen/scandir.c#5 integrate .. //depot/projects/dtrace/src/lib/libc/gen/sem_timedwait.3#1 branch .. //depot/projects/dtrace/src/lib/libc/gen/sem_wait.3#4 integrate .. //depot/projects/dtrace/src/lib/libc/sys/Makefile.inc#7 integrate .. //depot/projects/dtrace/src/lib/libc/sys/Symbol.map#7 integrate .. //depot/projects/dtrace/src/lib/libc/sys/fcntl.2#5 integrate .. //depot/projects/dtrace/src/lib/libc/sys/kldunload.2#4 integrate .. //depot/projects/dtrace/src/lib/libkvm/kvm_proc.c#11 integrate .. //depot/projects/dtrace/src/lib/libpmc/libpmc.c#6 integrate .. //depot/projects/dtrace/src/lib/libpmc/pmc.3#8 integrate .. //depot/projects/dtrace/src/lib/libpmc/pmc_capabilities.3#2 integrate .. //depot/projects/dtrace/src/lib/libsdp/sdp.h#5 integrate .. //depot/projects/dtrace/src/lib/libthr/thread/thr_create.c#9 integrate .. //depot/projects/dtrace/src/lib/libthr/thread/thr_sem.c#9 integrate .. //depot/projects/dtrace/src/lib/libthread_db/Makefile#6 integrate .. //depot/projects/dtrace/src/lib/libutil/humanize_number.c#4 integrate .. //depot/projects/dtrace/src/release/doc/en_US.ISO8859-1/relnotes/article.sgml#18 integrate .. //depot/projects/dtrace/src/release/doc/share/misc/dev.archlist.txt#17 integrate .. //depot/projects/dtrace/src/sbin/atacontrol/atacontrol.c#6 integrate .. //depot/projects/dtrace/src/sbin/geom/class/multipath/gmultipath.8#3 integrate .. //depot/projects/dtrace/src/sbin/mount/mount.8#10 integrate .. //depot/projects/dtrace/src/share/examples/cvsup/cvs-supfile#5 integrate .. //depot/projects/dtrace/src/share/man/man4/uart.4#5 integrate .. //depot/projects/dtrace/src/share/man/man4/vr.4#5 integrate .. //depot/projects/dtrace/src/share/man/man9/DEVICE_PROBE.9#4 integrate .. //depot/projects/dtrace/src/share/man/man9/Makefile#28 integrate .. //depot/projects/dtrace/src/share/man/man9/rwlock.9#9 integrate .. //depot/projects/dtrace/src/share/man/man9/stack.9#6 integrate .. //depot/projects/dtrace/src/share/misc/committers-ports.dot#5 integrate .. //depot/projects/dtrace/src/share/zoneinfo/leapseconds#7 integrate .. //depot/projects/dtrace/src/share/zoneinfo/southamerica#10 integrate .. //depot/projects/dtrace/src/sys/amd64/acpica/acpi_machdep.c#4 integrate .. //depot/projects/dtrace/src/sys/amd64/acpica/madt.c#7 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/amd64_mem.c#4 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/intr_machdep.c#12 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/legacy.c#6 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/local_apic.c#14 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/machdep.c#25 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/mem.c#4 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/mp_machdep.c#12 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/mptable.c#5 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/nexus.c#10 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/trap.c#24 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/vm_machdep.c#9 integrate .. //depot/projects/dtrace/src/sys/amd64/conf/DEFAULTS#12 integrate .. //depot/projects/dtrace/src/sys/amd64/ia32/ia32_signal.c#5 integrate .. //depot/projects/dtrace/src/sys/amd64/include/intr_machdep.h#8 integrate .. //depot/projects/dtrace/src/sys/amd64/include/nexusvar.h#1 branch .. //depot/projects/dtrace/src/sys/amd64/include/specialreg.h#11 integrate .. //depot/projects/dtrace/src/sys/amd64/isa/atpic.c#7 integrate .. //depot/projects/dtrace/src/sys/amd64/linux32/linux32_proto.h#15 integrate .. //depot/projects/dtrace/src/sys/amd64/linux32/linux32_syscall.h#15 integrate .. //depot/projects/dtrace/src/sys/amd64/linux32/linux32_sysent.c#15 integrate .. //depot/projects/dtrace/src/sys/amd64/linux32/linux32_sysvec.c#11 integrate .. //depot/projects/dtrace/src/sys/amd64/linux32/syscalls.master#14 integrate .. //depot/projects/dtrace/src/sys/arm/arm/busdma_machdep.c#9 integrate .. //depot/projects/dtrace/src/sys/arm/arm/intr.c#6 integrate .. //depot/projects/dtrace/src/sys/arm/arm/machdep.c#6 integrate .. //depot/projects/dtrace/src/sys/arm/arm/nexus.c#8 integrate .. //depot/projects/dtrace/src/sys/arm/arm/trap.c#11 integrate .. //depot/projects/dtrace/src/sys/arm/arm/vm_machdep.c#13 integrate .. //depot/projects/dtrace/src/sys/arm/conf/AVILA#6 integrate .. //depot/projects/dtrace/src/sys/arm/xscale/i8134x/crb_machdep.c#3 integrate .. //depot/projects/dtrace/src/sys/boot/common/dev_net.c#4 integrate .. //depot/projects/dtrace/src/sys/boot/i386/btx/btx/btx.S#8 integrate .. //depot/projects/dtrace/src/sys/boot/powerpc/uboot/metadata.c#3 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/Makefile#2 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/common/main.c#3 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/Makefile#3 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/api_public.h#3 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/console.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/copy.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/devicename.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/disk.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/elf_freebsd.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/glue.c#3 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/glue.h#2 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/libuboot.h#2 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/module.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/net.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/reboot.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/uboot/lib/time.c#2 integrate .. //depot/projects/dtrace/src/sys/compat/freebsd32/freebsd32_proto.h#21 integrate .. //depot/projects/dtrace/src/sys/compat/freebsd32/freebsd32_syscall.h#21 integrate .. //depot/projects/dtrace/src/sys/compat/freebsd32/freebsd32_syscalls.c#21 integrate .. //depot/projects/dtrace/src/sys/compat/freebsd32/freebsd32_sysent.c#21 integrate .. //depot/projects/dtrace/src/sys/compat/freebsd32/syscalls.master#21 integrate .. //depot/projects/dtrace/src/sys/compat/linux/linux_misc.c#21 integrate .. //depot/projects/dtrace/src/sys/compat/svr4/svr4_sysvec.c#5 integrate .. //depot/projects/dtrace/src/sys/conf/NOTES#41 integrate .. //depot/projects/dtrace/src/sys/conf/files#74 integrate .. //depot/projects/dtrace/src/sys/conf/options#42 integrate .. //depot/projects/dtrace/src/sys/dev/aac/aac.c#11 integrate .. //depot/projects/dtrace/src/sys/dev/acpica/acpi.c#13 integrate .. //depot/projects/dtrace/src/sys/dev/acpica/acpi_cpu.c#9 integrate .. //depot/projects/dtrace/src/sys/dev/acpica/acpivar.h#8 integrate .. //depot/projects/dtrace/src/sys/dev/agp/agp_i810.c#3 integrate .. //depot/projects/dtrace/src/sys/dev/bge/if_bge.c#25 integrate .. //depot/projects/dtrace/src/sys/dev/cpufreq/ichss.c#5 integrate .. //depot/projects/dtrace/src/sys/dev/gem/if_gem.c#11 integrate .. //depot/projects/dtrace/src/sys/dev/hwpmc/pmc_events.h#4 integrate .. //depot/projects/dtrace/src/sys/dev/msk/if_msk.c#9 integrate .. //depot/projects/dtrace/src/sys/dev/mxge/if_mxge.c#15 integrate .. //depot/projects/dtrace/src/sys/dev/ofw/ofw_console.c#9 integrate .. //depot/projects/dtrace/src/sys/dev/syscons/sysmouse.c#5 integrate .. //depot/projects/dtrace/src/sys/dev/tdfx/tdfx_pci.c#4 integrate .. //depot/projects/dtrace/src/sys/dev/tsec/if_tsec.c#2 integrate .. //depot/projects/dtrace/src/sys/dev/tsec/if_tsec.h#2 integrate .. //depot/projects/dtrace/src/sys/dev/uart/uart.h#6 integrate .. //depot/projects/dtrace/src/sys/dev/uart/uart_dev_ns8250.c#8 integrate .. //depot/projects/dtrace/src/sys/dev/usb/ehci_pci.c#7 integrate .. //depot/projects/dtrace/src/sys/dev/usb/ums.c#8 integrate .. //depot/projects/dtrace/src/sys/dev/usb/usb_quirks.c#10 integrate .. //depot/projects/dtrace/src/sys/dev/usb/usbdevs#25 integrate .. //depot/projects/dtrace/src/sys/dev/vr/if_vr.c#1 branch .. //depot/projects/dtrace/src/sys/dev/vr/if_vrreg.h#1 branch .. //depot/projects/dtrace/src/sys/dev/wpi/if_wpi.c#8 integrate .. //depot/projects/dtrace/src/sys/dev/wpi/if_wpireg.h#3 integrate .. //depot/projects/dtrace/src/sys/dev/wpi/if_wpivar.h#2 integrate .. //depot/projects/dtrace/src/sys/fs/fifofs/fifo_vnops.c#10 integrate .. //depot/projects/dtrace/src/sys/fs/procfs/procfs_ctl.c#5 integrate .. //depot/projects/dtrace/src/sys/fs/procfs/procfs_dbregs.c#5 integrate .. //depot/projects/dtrace/src/sys/fs/procfs/procfs_status.c#7 integrate .. //depot/projects/dtrace/src/sys/gdb/gdb_cons.c#6 integrate .. //depot/projects/dtrace/src/sys/i386/acpica/acpi_machdep.c#7 integrate .. //depot/projects/dtrace/src/sys/i386/acpica/acpi_wakeup.c#7 integrate .. //depot/projects/dtrace/src/sys/i386/acpica/madt.c#7 integrate .. //depot/projects/dtrace/src/sys/i386/conf/DEFAULTS#12 integrate .. //depot/projects/dtrace/src/sys/i386/cpufreq/est.c#6 integrate .. //depot/projects/dtrace/src/sys/i386/i386/i686_mem.c#4 integrate .. //depot/projects/dtrace/src/sys/i386/i386/intr_machdep.c#10 integrate .. //depot/projects/dtrace/src/sys/i386/i386/k6_mem.c#4 integrate .. //depot/projects/dtrace/src/sys/i386/i386/legacy.c#6 integrate .. //depot/projects/dtrace/src/sys/i386/i386/local_apic.c#16 integrate .. //depot/projects/dtrace/src/sys/i386/i386/machdep.c#26 integrate .. //depot/projects/dtrace/src/sys/i386/i386/mp_machdep.c#13 integrate .. //depot/projects/dtrace/src/sys/i386/i386/mptable.c#5 integrate .. //depot/projects/dtrace/src/sys/i386/i386/nexus.c#9 integrate .. //depot/projects/dtrace/src/sys/i386/i386/sys_machdep.c#8 integrate .. //depot/projects/dtrace/src/sys/i386/i386/trap.c#29 integrate .. //depot/projects/dtrace/src/sys/i386/i386/vm_machdep.c#8 integrate .. //depot/projects/dtrace/src/sys/i386/ibcs2/imgact_coff.c#9 integrate .. //depot/projects/dtrace/src/sys/i386/include/intr_machdep.h#8 integrate .. //depot/projects/dtrace/src/sys/i386/include/nexusvar.h#1 branch .. //depot/projects/dtrace/src/sys/i386/include/specialreg.h#9 integrate .. //depot/projects/dtrace/src/sys/i386/isa/atpic.c#7 integrate .. //depot/projects/dtrace/src/sys/i386/linux/linux_proto.h#17 integrate .. //depot/projects/dtrace/src/sys/i386/linux/linux_syscall.h#16 integrate .. //depot/projects/dtrace/src/sys/i386/linux/linux_sysent.c#16 integrate .. //depot/projects/dtrace/src/sys/i386/linux/linux_sysvec.c#9 integrate .. //depot/projects/dtrace/src/sys/i386/linux/syscalls.master#16 integrate .. //depot/projects/dtrace/src/sys/i386/svr4/svr4_machdep.c#4 integrate .. //depot/projects/dtrace/src/sys/i386/xbox/xbox.c#5 integrate .. //depot/projects/dtrace/src/sys/ia64/conf/DEFAULTS#12 integrate .. //depot/projects/dtrace/src/sys/ia64/ia64/interrupt.c#7 integrate .. //depot/projects/dtrace/src/sys/ia64/ia64/machdep.c#16 integrate .. //depot/projects/dtrace/src/sys/ia64/ia64/nexus.c#7 integrate .. //depot/projects/dtrace/src/sys/ia64/ia64/sscdisk.c#4 integrate .. //depot/projects/dtrace/src/sys/ia64/ia64/trap.c#12 integrate .. //depot/projects/dtrace/src/sys/ia64/include/ucontext.h#4 integrate .. //depot/projects/dtrace/src/sys/ia64/isa/isa_dma.c#5 integrate .. //depot/projects/dtrace/src/sys/kern/imgact_elf.c#13 integrate .. //depot/projects/dtrace/src/sys/kern/init_main.c#26 integrate .. //depot/projects/dtrace/src/sys/kern/init_sysent.c#25 integrate .. //depot/projects/dtrace/src/sys/kern/kern_alq.c#9 integrate .. //depot/projects/dtrace/src/sys/kern/kern_clock.c#13 integrate .. //depot/projects/dtrace/src/sys/kern/kern_condvar.c#7 integrate .. //depot/projects/dtrace/src/sys/kern/kern_descrip.c#23 integrate .. //depot/projects/dtrace/src/sys/kern/kern_event.c#12 integrate .. //depot/projects/dtrace/src/sys/kern/kern_exec.c#26 integrate .. //depot/projects/dtrace/src/sys/kern/kern_fork.c#29 integrate .. //depot/projects/dtrace/src/sys/kern/kern_idle.c#11 integrate .. //depot/projects/dtrace/src/sys/kern/kern_intr.c#16 integrate .. //depot/projects/dtrace/src/sys/kern/kern_kse.c#12 delete .. //depot/projects/dtrace/src/sys/kern/kern_linker.c#31 integrate .. //depot/projects/dtrace/src/sys/kern/kern_malloc.c#9 integrate .. //depot/projects/dtrace/src/sys/kern/kern_mbuf.c#15 integrate .. //depot/projects/dtrace/src/sys/kern/kern_module.c#8 integrate .. //depot/projects/dtrace/src/sys/kern/kern_ntptime.c#7 integrate .. //depot/projects/dtrace/src/sys/kern/kern_poll.c#8 integrate .. //depot/projects/dtrace/src/sys/kern/kern_proc.c#20 integrate .. //depot/projects/dtrace/src/sys/kern/kern_resource.c#15 integrate .. //depot/projects/dtrace/src/sys/kern/kern_shutdown.c#16 integrate .. //depot/projects/dtrace/src/sys/kern/kern_sig.c#22 integrate .. //depot/projects/dtrace/src/sys/kern/kern_switch.c#15 integrate .. //depot/projects/dtrace/src/sys/kern/kern_sx.c#12 integrate .. //depot/projects/dtrace/src/sys/kern/kern_synch.c#19 integrate .. //depot/projects/dtrace/src/sys/kern/kern_tc.c#12 integrate .. //depot/projects/dtrace/src/sys/kern/kern_thread.c#21 integrate .. //depot/projects/dtrace/src/sys/kern/kern_timeout.c#9 integrate .. //depot/projects/dtrace/src/sys/kern/link_elf.c#17 integrate .. //depot/projects/dtrace/src/sys/kern/link_elf_obj.c#14 integrate .. //depot/projects/dtrace/src/sys/kern/p1003_1b.c#5 integrate .. //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#33 integrate .. //depot/projects/dtrace/src/sys/kern/sched_ule.c#29 integrate .. //depot/projects/dtrace/src/sys/kern/subr_autoconf.c#6 integrate .. //depot/projects/dtrace/src/sys/kern/subr_bus.c#13 integrate .. //depot/projects/dtrace/src/sys/kern/subr_eventhandler.c#4 integrate .. //depot/projects/dtrace/src/sys/kern/subr_log.c#4 integrate .. //depot/projects/dtrace/src/sys/kern/subr_prof.c#5 integrate .. //depot/projects/dtrace/src/sys/kern/subr_sleepqueue.c#13 integrate .. //depot/projects/dtrace/src/sys/kern/subr_smp.c#12 integrate .. //depot/projects/dtrace/src/sys/kern/subr_trap.c#11 integrate .. //depot/projects/dtrace/src/sys/kern/subr_witness.c#15 integrate .. //depot/projects/dtrace/src/sys/kern/sys_process.c#16 integrate .. //depot/projects/dtrace/src/sys/kern/syscalls.c#24 integrate .. //depot/projects/dtrace/src/sys/kern/syscalls.master#20 integrate .. //depot/projects/dtrace/src/sys/kern/systrace_args.c#20 integrate .. //depot/projects/dtrace/src/sys/kern/tty_cons.c#13 integrate .. //depot/proj