From owner-p4-projects@FreeBSD.ORG Mon Aug 7 08:27:20 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8032D16A4E2; Mon, 7 Aug 2006 08:27:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4934516A4E0 for ; Mon, 7 Aug 2006 08:27:20 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F25543DC7 for ; Mon, 7 Aug 2006 08:26:37 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k778QaCO022465 for ; Mon, 7 Aug 2006 08:26:36 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k778Qaj2022461 for perforce@freebsd.org; Mon, 7 Aug 2006 08:26:36 GMT (envelope-from jb@freebsd.org) Date: Mon, 7 Aug 2006 08:26:36 GMT Message-Id: <200608070826.k778Qaj2022461@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 103369 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: Mon, 07 Aug 2006 08:27:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=103369 Change 103369 by jb@jb_freebsd2 on 2006/08/07 08:26:15 IFC Affected files ... .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml#18 integrate .. //depot/projects/dtrace/ports/MOVED#10 integrate .. //depot/projects/dtrace/ports/UPDATING#10 integrate .. //depot/projects/dtrace/src/gnu/usr.bin/groff/tmac/mdoc.local#3 integrate .. //depot/projects/dtrace/src/sbin/dump/optr.c#4 integrate .. //depot/projects/dtrace/src/share/examples/drivers/make_device_driver.sh#3 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/pmap.c#13 integrate .. //depot/projects/dtrace/src/sys/compat/svr4/svr4_stream.c#7 integrate .. //depot/projects/dtrace/src/sys/dev/usb/usbdevs#6 integrate .. //depot/projects/dtrace/src/sys/dev/usb/uscanner.c#4 integrate .. //depot/projects/dtrace/src/sys/i386/i386/pmap.c#9 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_syscalls.c#9 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_usrreq.c#10 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_lookup.c#5 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_subr.c#9 integrate .. //depot/projects/dtrace/src/sys/netgraph/ng_pppoe.c#3 integrate .. //depot/projects/dtrace/src/sys/security/mac_biba/mac_biba.c#4 integrate .. //depot/projects/dtrace/src/sys/sparc64/sparc64/pmap.c#6 integrate .. //depot/projects/dtrace/src/sys/sys/mac_policy.h#4 integrate .. //depot/projects/dtrace/src/sys/vm/vm_fault.c#5 integrate .. //depot/projects/dtrace/src/sys/vm/vm_page.c#10 integrate .. //depot/projects/dtrace/src/tools/tools/net80211/Makefile#4 integrate .. //depot/projects/dtrace/src/tools/tools/net80211/README#2 integrate .. //depot/projects/dtrace/src/tools/tools/net80211/w00t/libw00t/w00t.c#2 integrate .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/Makefile#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/README#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/dics/Makefile#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/dics/dics.c#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/udps/Makefile#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/udps/udps.c#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/wesside/Makefile#1 branch .. //depot/projects/dtrace/src/tools/tools/net80211/wesside/wesside/wesside.c#1 branch .. //depot/projects/dtrace/www/zh_CN/includes.xsl#2 integrate .. //depot/projects/dtrace/www/zh_CN/news/news.xml#3 integrate .. //depot/projects/dtrace/www/zh_CN/news/press.xml#3 integrate Differences ... ==== //depot/projects/dtrace/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml#18 (text+ko) ==== @@ -1,7 +1,7 @@ USE_X_PREFIX - The port installs in X11BASE, not + The port installs in X11BASE_REL, not PREFIX. @@ -6779,17 +6779,30 @@ - <makevar>PREFIX</makevar> + <makevar>PREFIX</makevar> and <makevar>DESTDIR</makevar> + + PREFIX determines the location where + the port will install. It is usually /usr/local, + or /opt. User can set PREFIX + to anything he wants. Your port must respect this variable. + + DESTDIR, if set by user, determines the + complete alternative environment, usually a jail, or an installed + system mounted elsewhere than /. + A port will actually install into + DESTDIR/PREFIX, and register + with the package database in DESTDIR/var/db/pkg. + It is very important to write ports that respect + DESTDIR. - Do try to make your port install relative to - PREFIX. The value of this variable will be set - to LOCALBASE (default + The value of PREFIX will be set + to LOCALBASE_REL (default /usr/local). If USE_X_PREFIX or USE_IMAKE is - set, PREFIX will be X11BASE (default + set, PREFIX will be X11BASE_REL (default /usr/X11R6). If USE_LINUX_PREFIX is set, PREFIX - will be LINUXBASE (default + will be LINUXBASE_REL (default /compat/linux). Avoiding the hard-coding of /usr/local or @@ -6799,7 +6812,7 @@ automatic; otherwise, this can often be done by simply replacing the occurrences of /usr/local (or /usr/X11R6 for X ports that do not use imake) - in the various scripts/Makefiles in the port to read + in the various Makefiles in the port to read ${PREFIX}, as this variable is automatically passed down to every stage of the build and install processes. @@ -6821,7 +6834,7 @@ to do that while you have it installed would do that. Do not set USE_X_PREFIX unless your port - truly requires it (i.e., it links against X libs or it needs to + truly requires it (i.e., it needs to reference files in X11BASE). The variable PREFIX can be reassigned in your @@ -6840,6 +6853,48 @@ -DPAGER=\"/usr/local/bin/less\". This way it will have a better chance of working if the system administrator has moved the whole /usr/local tree somewhere else. + + Note that LOCALBASE, + LINUXBASE, X11BASE, + DOCSDIR, EXAMPLESDIR, + DATADIR, DESKTOPDIR variables + already contain DESTDIR. Using + DESTDIR LOCALBASE is + wrong. Use LOCALBASE_REL, + LINUXBASE_REL, X11BASE_REL + if you need a variable relative to DESTDIR. + To keep things terse, TARGETDIR can be used to + replace DESTDIR PREFIX. + + Example of correct usage: + + post-install: + ${INSTALL_PROGRAM} ${WRKSRC}/helper ${TARGETDIR}/bin/helper + ${INSTALL_DATA} ${WRKSRC}/guide.txt ${DOCSDIR} + + When referencing dependencies in the port, the + LOCALBASE is used, as we are working with + dependencies inside the target environment. For hardcoding file + paths in the software, LOCALBASE_REL must + be used, because the software will run inside the target + environment. + + Example of correct usage: + + RUN_DEPENDS= ${LOCALBASE}/share/gonzo/launch.dat:${PORTSDIR}/games/gonzo + +post-patch: + @${REINPLACE_CMD} -e 's|/usr/gonzo/launch.dat|${LOCALBASE_REL}/share/gonzo/launch.dat}' ${WRKSRC}/main.c + @${REINPLACE_CMD} -e 's|/etc/game.conf|${PREFIX}/etc/game.conf|' ${WRKSRC}/loader.c + +post-install: + @${INSTALL_DATA} ${WRKSRC}/example/conf ${TARGETDIR}/etc/game.conf + + In packing lists and in pkg-* scripts, + %%LOCALBASE%%, %%LINUXBASE%% + and %%X11BASE%% expansions will contain paths + stripped of DESTDIR, as all these files are + processed of a context of target environment. ==== //depot/projects/dtrace/ports/MOVED#10 (text+ko) ==== @@ -1,7 +1,7 @@ # # MOVED - a list of (recently) moved or removed ports # -# $FreeBSD: ports/MOVED,v 1.1108 2006/08/04 14:57:47 acm Exp $ +# $FreeBSD: ports/MOVED,v 1.1111 2006/08/07 07:00:18 vanilla Exp $ # # Each entry consists of a single line containing the following four # fields in the order named, separated with the pipe (`|') character: @@ -2430,3 +2430,5 @@ net/svnc||2006-08-01|Has expired: mastersite gone, depends on unfetchable, antique version of vnc devel/p5-IPC-Mmap-SimpleShare||2006-08-01|Has expired devel/p5-Readonly-XS|devel/p5-Readonly|2006-08-02|p5-Readonly installs XS automatically +chinese/arnettf||2006-08-06|Renamed to chinese/CJKUnifonts +devel/SGE||2006-08-07|Has expired ==== //depot/projects/dtrace/ports/UPDATING#10 (text+ko) ==== @@ -6,6 +6,14 @@ time you update your ports collection, before attempting any port upgrades. +20060804: + AFFECTS: users of editors/jedit-devel + AUTHOR: question+fbsdports@closedsrc.org + + Starting with jEdit 4.3pre6, jedit-devel now requires Java 1.5+ to be + installed due to new features and classes used by the package. If you + cannot install or use Java 1.5, you will need to stay with jEdit 4.2. + 20060802: AFFECTS: users of www/linux-opera AUTHOR: mezz@FreeBSD.org @@ -3966,4 +3974,4 @@ 2) Update all p5-* modules. portupgrade -f p5-\* -$FreeBSD: ports/UPDATING,v 1.378 2006/08/03 18:45:53 blackend Exp $ +$FreeBSD: ports/UPDATING,v 1.379 2006/08/06 03:04:13 rafan Exp $ ==== //depot/projects/dtrace/src/gnu/usr.bin/groff/tmac/mdoc.local#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/gnu/usr.bin/groff/tmac/mdoc.local,v 1.52 2006/01/12 15:33:18 ru Exp $ +.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.53 2006/08/05 20:38:23 yar Exp $ .\" .\" %beginstrip% . @@ -34,6 +34,7 @@ .\" FreeBSD .Lb values .ds doc-str-Lb-libarchive Streaming Archive Library (libarchive, \-larchive) .ds doc-str-Lb-libbluetooth Bluetooth User Library (libbluetooth, \-lbluetooth) +.ds doc-str-Lb-libbsm Basic Security Module User Library (libbsm, \-lbsm) .ds doc-str-Lb-libc_r Reentrant C\~Library (libc_r, \-lc_r) .ds doc-str-Lb-libcalendar Calendar Arithmetic Library (libcalendar, \-lcalendar) .ds doc-str-Lb-libcam Common Access Method User Library (libcam, \-lcam) ==== //depot/projects/dtrace/src/sbin/dump/optr.c#4 (text+ko) ==== @@ -32,7 +32,7 @@ static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94"; #endif static const char rcsid[] = - "$FreeBSD: src/sbin/dump/optr.c,v 1.33 2006/08/05 12:50:38 rse Exp $"; + "$FreeBSD: src/sbin/dump/optr.c,v 1.35 2006/08/06 14:23:50 marck Exp $"; #endif /* not lint */ #include @@ -209,14 +209,15 @@ mins = (deltat % 3600) / 60; tdone_str = ctime(&tdone); + tdone_str[strlen(tdone_str) - 1] = '\0'; setproctitle( - "%s: pass %d: %3.2f%% done, finished in %d:%02d at %.*s", - disk, passno, percent, hours, mins, strlen(tdone_str) - 1, tdone_str); + "%s: pass %d: %3.2f%% done, finished in %d:%02d at %s", + disk, passno, percent, hours, mins, tdone_str); if (tnow >= tschedule) { tschedule = tnow + 300; if (blockswritten < 500) return; - msg("%3.2f%% done, finished in %d:%02d at %s", percent, + msg("%3.2f%% done, finished in %d:%02d at %s\n", percent, hours, mins, tdone_str); } } ==== //depot/projects/dtrace/src/share/examples/drivers/make_device_driver.sh#3 (text+ko) ==== @@ -12,6 +12,7 @@ # cd /sys/modules/foo; make depend; make; make install; kldload foo # # arg1 to this script is expected to be lowercase "foo" +# arg2 path to the kernel sources, "/sys" if omitted # # Trust me, RUN THIS SCRIPT :) # @@ -19,19 +20,21 @@ # o generate foo_isa.c, foo_pci.c, foo_pccard.c, foo_cardbus.c, and foovar.h # o Put pccard stuff in here. # -# $FreeBSD: src/share/examples/drivers/make_device_driver.sh,v 1.21 2003/10/03 19:31:55 dds Exp $" +# $FreeBSD: src/share/examples/drivers/make_device_driver.sh,v 1.23 2006/08/06 11:06:35 rik Exp $" # # if [ "X${1}" = "X" ]; then echo "Hey, how about some help here... give me a device name!" exit 1 fi +if [ "X${2}" = "X" ]; then + TOP=`cd /sys; pwd -P` + echo "Using ${TOP} as the path to the kernel sources!" +else + TOP=${2} +fi UPPER=`echo ${1} |tr "[:lower:]" "[:upper:]"` -HERE=`pwd` -cd /sys -TOP=`pwd` - RCS_KEYWORD=FreeBSD if [ -d ${TOP}/modules/${1} ]; then @@ -46,7 +49,7 @@ echo "Cleaning up from prior runs" rm -rf ${TOP}/dev/${1} rm -rf ${TOP}/modules/${1} - rm ${TOP}/i386/conf/files.${UPPER} + rm ${TOP}/conf/files.${UPPER} rm ${TOP}/i386/conf/${UPPER} rm ${TOP}/sys/${1}io.h ;; @@ -58,7 +61,7 @@ echo "The following files will be created:" echo ${TOP}/modules/${1} -echo ${TOP}/i386/conf/files.${UPPER} +echo ${TOP}/conf/files.${UPPER} echo ${TOP}/i386/conf/${UPPER} echo ${TOP}/dev/${1} echo ${TOP}/dev/${1}/${1}.c @@ -79,7 +82,7 @@ # First add the file to a local file list. ####################################################################### -cat >${TOP}/i386/conf/files.${UPPER} <${TOP}/conf/files.${UPPER} <${TOP}/i386/conf/${UPPER} <>${TOP}/i386/conf/${UPPER} - cat >>${TOP}/i386/conf/${UPPER} < #include -#include -#include #include #include @@ -198,7 +201,7 @@ struct resource* res_irq; /* Resource for irq range. */ struct resource* res_drq; /* Resource for dma channel. */ device_t device; - dev_t dev; + struct cdev *dev; void *intr_cookie; void *vaddr; /* Virtual address of mem resource. */ char buffer[BUFFERSIZE]; /* If we need to buffer something. */ @@ -219,8 +222,8 @@ static d_poll_t ${1}poll; static void ${1}intr(void *arg); -#define CDEV_MAJOR 20 static struct cdevsw ${1}_cdevsw = { + .d_version = D_VERSION, .d_open = ${1}open, .d_close = ${1}close, .d_read = ${1}read, @@ -229,7 +232,6 @@ .d_poll = ${1}poll, .d_mmap = ${1}mmap, .d_name = "${1}", - .d_maj = CDEV_MAJOR, }; static devclass_t ${1}_devclass; @@ -818,7 +820,7 @@ } static int -${1}ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +${1}ioctl (struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct ${1}_softc *scp = DEV2SOFTC(dev); @@ -840,7 +842,7 @@ * This should get you started. */ static int -${1}open(dev_t dev, int oflags, int devtype, struct thread *td) +${1}open(struct cdev *dev, int oflags, int devtype, struct thread *td) { struct ${1}_softc *scp = DEV2SOFTC(dev); @@ -852,7 +854,7 @@ } static int -${1}close(dev_t dev, int fflag, int devtype, struct thread *td) +${1}close(struct cdev *dev, int fflag, int devtype, struct thread *td) { struct ${1}_softc *scp = DEV2SOFTC(dev); @@ -864,7 +866,7 @@ } static int -${1}read(dev_t dev, struct uio *uio, int ioflag) +${1}read(struct cdev *dev, struct uio *uio, int ioflag) { struct ${1}_softc *scp = DEV2SOFTC(dev); int toread; @@ -879,7 +881,7 @@ } static int -${1}write(dev_t dev, struct uio *uio, int ioflag) +${1}write(struct cdev *dev, struct uio *uio, int ioflag) { struct ${1}_softc *scp = DEV2SOFTC(dev); int towrite; @@ -894,7 +896,7 @@ } static int -${1}mmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) +${1}mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot) { struct ${1}_softc *scp = DEV2SOFTC(dev); @@ -913,7 +915,7 @@ } static int -${1}poll(dev_t dev, int which, struct thread *td) +${1}poll(struct cdev *dev, int which, struct thread *td) { struct ${1}_softc *scp = DEV2SOFTC(dev); @@ -967,15 +969,23 @@ .include DONE -(cd ${TOP}/modules/${1}; make depend; make ) -exit +echo -n "Do you want to build the '${1}' module? [Y]" +read VAL +if [ "-z" "$VAL" ]; then + VAL=YES +fi +case ${VAL} in +[yY]*) + (cd ${TOP}/modules/${1}; make depend; make ) + ;; +*) +# exit + ;; +esac -config ${UPPER} -cd ../../compile/${UPPER} -make depend -make ${1}.o -make -exit +echo "" +echo "To build the kernel you should merge ${TOP}/conf/files.${UPPER} " \ + "into one of the ${TOP}/conf/files*" #--------------end of script--------------- # ==== //depot/projects/dtrace/src/sys/amd64/amd64/pmap.c#13 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.568 2006/08/01 19:06:04 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.569 2006/08/06 06:29:16 alc Exp $"); /* * Manages physical address maps. @@ -2506,7 +2506,6 @@ retry: p = vm_page_lookup(object, pindex); if (p != NULL) { - vm_page_lock_queues(); if (vm_page_sleep_if_busy(p, FALSE, "init4p")) goto retry; } else { @@ -2525,8 +2524,8 @@ p = vm_page_lookup(object, pindex); vm_page_lock_queues(); vm_page_wakeup(p); + vm_page_unlock_queues(); } - vm_page_unlock_queues(); ptepa = VM_PAGE_TO_PHYS(p); if (ptepa & (NBPDR - 1)) ==== //depot/projects/dtrace/src/sys/compat/svr4/svr4_stream.c#7 (text+ko) ==== @@ -36,11 +36,10 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.61 2006/07/28 16:56:17 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_stream.c,v 1.62 2006/08/05 22:04:21 rwatson Exp $"); #include "opt_compat.h" #include "opt_ktrace.h" -#include "opt_mac.h" #include #include @@ -50,7 +49,6 @@ #include #include #include /* Must come after sys/malloc.h */ -#include #include #include #include ==== //depot/projects/dtrace/src/sys/dev/usb/usbdevs#6 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/usb/usbdevs,v 1.263 2006/07/24 19:47:00 imp Exp $ +$FreeBSD: src/sys/dev/usb/usbdevs,v 1.264 2006/08/06 12:01:42 bms Exp $ /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ /*- @@ -890,6 +890,7 @@ product EPSON 1670 0x011f Perfection 1670 scanner product EPSON 1270 0x0120 Perfection 1270 scanner product EPSON 2480 0x0121 Perfection 2480 scanner +product EPSON 3500 0x080e CX-3500/3600/3650 MFP product EPSON RX425 0x080f Stylus Photo RX425 scanner /* e-TEK Labs products */ ==== //depot/projects/dtrace/src/sys/dev/usb/uscanner.c#4 (text+ko) ==== @@ -5,7 +5,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/uscanner.c,v 1.71 2006/06/18 17:28:08 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/uscanner.c,v 1.72 2006/08/06 12:01:42 bms Exp $"); /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -213,6 +213,7 @@ {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_GT9700F }, USC_KEEP_OPEN }, {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_GT9300UF }, 0 }, {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_2480 }, 0 }, + {{ USB_VENDOR_EPSON, USB_PRODUCT_EPSON_3500 }, USC_KEEP_OPEN }, /* UMAX */ {{ USB_VENDOR_UMAX, USB_PRODUCT_UMAX_ASTRA1220U }, 0 }, ==== //depot/projects/dtrace/src/sys/i386/i386/pmap.c#9 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.572 2006/08/01 19:06:05 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/pmap.c,v 1.573 2006/08/06 06:29:16 alc Exp $"); /* * Manages physical address maps. @@ -2581,7 +2581,6 @@ retry: p = vm_page_lookup(object, pindex); if (p != NULL) { - vm_page_lock_queues(); if (vm_page_sleep_if_busy(p, FALSE, "init4p")) goto retry; } else { @@ -2600,8 +2599,8 @@ p = vm_page_lookup(object, pindex); vm_page_lock_queues(); vm_page_wakeup(p); + vm_page_unlock_queues(); } - vm_page_unlock_queues(); ptepa = VM_PAGE_TO_PHYS(p); if (ptepa & (NBPDR - 1)) ==== //depot/projects/dtrace/src/sys/kern/uipc_syscalls.c#9 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.235 2006/08/04 05:53:20 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/uipc_syscalls.c,v 1.236 2006/08/06 01:00:09 alc Exp $"); #include "opt_compat.h" #include "opt_ktrace.h" @@ -2038,14 +2038,14 @@ VM_OBJECT_LOCK(obj); goto retry_lookup; } - } else { - vm_page_lock_queues(); - if (vm_page_sleep_if_busy(pg, TRUE, "sfpbsy")) - goto retry_lookup; + } else if (vm_page_sleep_if_busy(pg, TRUE, "sfpbsy")) + goto retry_lookup; + else { /* * Wire the page so it does not get ripped out from * under us. */ + vm_page_lock_queues(); vm_page_wire(pg); vm_page_unlock_queues(); } ==== //depot/projects/dtrace/src/sys/kern/uipc_usrreq.c#10 (text+ko) ==== @@ -50,7 +50,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.184 2006/08/02 14:30:58 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/uipc_usrreq.c,v 1.185 2006/08/06 10:39:21 rwatson Exp $"); #include "opt_mac.h" @@ -803,9 +803,6 @@ .pru_sense = uipc_sense, .pru_shutdown = uipc_shutdown, .pru_sockaddr = uipc_sockaddr, - .pru_sosend = sosend_generic, - .pru_soreceive = soreceive_generic, - .pru_sopoll = sopoll_generic, .pru_close = uipc_close, }; ==== //depot/projects/dtrace/src/sys/kern/vfs_lookup.c#5 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.92 2006/08/05 21:08:47 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_lookup.c,v 1.93 2006/08/05 21:40:59 rwatson Exp $"); #include "opt_ktrace.h" #include "opt_mac.h" @@ -108,12 +108,11 @@ * } */ int -namei(ndp) - register struct nameidata *ndp; +namei(struct nameidata *ndp) { - register struct filedesc *fdp; /* pointer to file descriptor state */ - register char *cp; /* pointer into pathname argument */ - register struct vnode *dp; /* the directory we are searching */ + struct filedesc *fdp; /* pointer to file descriptor state */ + char *cp; /* pointer into pathname argument */ + struct vnode *dp; /* the directory we are searching */ struct iovec aiov; /* uio for reading symbolic links */ struct uio auio; int error, linklen; @@ -343,11 +342,10 @@ * if WANTPARENT set, return unlocked parent in ni_dvp */ int -lookup(ndp) - register struct nameidata *ndp; +lookup(struct nameidata *ndp) { - register char *cp; /* pointer into pathname argument */ - register struct vnode *dp = 0; /* the directory we are searching */ + char *cp; /* pointer into pathname argument */ + struct vnode *dp = 0; /* the directory we are searching */ struct vnode *tdp; /* saved dp */ struct mount *mp; /* mount table entry */ int docache; /* == 0 do not cache last component */ @@ -766,9 +764,7 @@ * Used by lookup to re-aquire things. */ int -relookup(dvp, vpp, cnp) - struct vnode *dvp, **vpp; - struct componentname *cnp; +relookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp) { struct thread *td = cnp->cn_thread; struct vnode *dp = 0; /* the directory we are searching */ @@ -910,9 +906,7 @@ * Free data allocated by namei(); see namei(9) for details. */ void -NDFREE(ndp, flags) - struct nameidata *ndp; - const u_int flags; +NDFREE(struct nameidata *ndp, const u_int flags) { int unlock_dvp; int unlock_vp; ==== //depot/projects/dtrace/src/sys/kern/vfs_subr.c#9 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.678 2006/07/15 06:44:27 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/vfs_subr.c,v 1.679 2006/08/06 10:43:35 rwatson Exp $"); #include "opt_ddb.h" #include "opt_mac.h" @@ -3134,6 +3134,9 @@ * and optional call-by-reference privused argument allowing vaccess() * to indicate to the caller whether privilege was used to satisfy the * request (obsoleted). Returns 0 on success, or an errno on failure. + * + * The ifdef'd CAPABILITIES version is here for reference, but is not + * actually used. */ int vaccess(enum vtype type, mode_t file_mode, uid_t file_uid, gid_t file_gid, @@ -3207,9 +3210,11 @@ /* * Build a capability mask to determine if the set of capabilities * satisfies the requirements when combined with the granted mask - * from above. - * For each capability, if the capability is required, bitwise - * or the request type onto the cap_granted mask. + * from above. For each capability, if the capability is required, + * bitwise or the request type onto the cap_granted mask. + * + * Note: This is never actually used, but is here for reference + * purposes. */ cap_granted = 0; @@ -3219,7 +3224,8 @@ * VEXEC requests, instead of CAP_DAC_EXECUTE. */ if ((acc_mode & VEXEC) && ((dac_granted & VEXEC) == 0) && - !cap_check(cred, NULL, CAP_DAC_READ_SEARCH, SUSER_ALLOWJAIL)) + !cap_check(cred, NULL, CAP_DAC_READ_SEARCH, + SUSER_ALLOWJAIL)) cap_granted |= VEXEC; } else { if ((acc_mode & VEXEC) && ((dac_granted & VEXEC) == 0) && ==== //depot/projects/dtrace/src/sys/netgraph/ng_pppoe.c#3 (text+ko) ==== @@ -37,7 +37,7 @@ * * Author: Julian Elischer * - * $FreeBSD: src/sys/netgraph/ng_pppoe.c,v 1.78 2006/01/27 10:56:22 glebius Exp $ + * $FreeBSD: src/sys/netgraph/ng_pppoe.c,v 1.79 2006/08/07 08:05:10 glebius Exp $ * $Whistle: ng_pppoe.c,v 1.10 1999/11/01 09:24:52 julian Exp $ */ @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -261,7 +262,7 @@ #define LEAVE(x) do { error = x; goto quit; } while(0) static void pppoe_start(sessp sp); -static void sendpacket(sessp sp); +static void ng_pppoe_sendpacket(sessp sp); static void pppoe_ticker(node_p node, hook_p hook, void *arg1, int arg2); static const struct pppoe_tag *scan_tags(sessp sp, const struct pppoe_hdr* ph); @@ -383,7 +384,8 @@ if ((i = neg->numtags++) < NUMTAGS) { neg->tags[i] = tp; } else { - printf("pppoe: asked to add too many tags to packet\n"); + log(LOG_NOTICE, "ng_pppoe: asked to add too many tags to " + "packet\n"); neg->numtags--; } } @@ -406,7 +408,7 @@ uint16_t length = 0; KASSERT((sp->neg != NULL) && (sp->neg->m != NULL), - ("%s: make_packet called from wrong state", __func__)); + ("%s: called from wrong state", __func__)); CTR2(KTR_NET, "%20s: called %d", __func__, sp->Session_ID); dp = (char *)wh->ph.tag; @@ -415,7 +417,7 @@ tag++, count++) { tlen = ntohs((*tag)->tag_len) + sizeof(**tag); if ((length + tlen) > (ETHER_MAX_LEN - 4 - sizeof(*wh))) { - printf("pppoe: tags too long\n"); + log(LOG_NOTICE, "ng_pppoe: tags too long\n"); sp->neg->numtags = count; break; /* XXX chop off what's too long */ } @@ -714,18 +716,21 @@ case NGM_PPPOE_SERVICE: ourmsg = (struct ngpppoe_init_data *)msg->data; if (msg->header.arglen < sizeof(*ourmsg)) { - printf("pppoe: init data too small\n"); + log(LOG_ERR, "ng_pppoe[%x]: init data too " + "small\n", node->nd_ID); LEAVE(EMSGSIZE); } if (msg->header.arglen - sizeof(*ourmsg) > PPPOE_SERVICE_NAME_SIZE) { - printf("pppoe_rcvmsg: service name too big"); + log(LOG_ERR, "ng_pppoe[%x]: service name " + "too big\n", node->nd_ID); LEAVE(EMSGSIZE); } if (msg->header.arglen - sizeof(*ourmsg) < ourmsg->data_len) { - printf("pppoe: init data has bad length," - " %d should be %zd\n", ourmsg->data_len, + log(LOG_ERR, "ng_pppoe[%x]: init data has bad " + "length, %d should be %zd\n", node->nd_ID, + ourmsg->data_len, msg->header.arglen - sizeof (*ourmsg)); LEAVE(EMSGSIZE); } @@ -767,7 +772,8 @@ break; if (sp->state != PPPOE_SNONE) { - printf("pppoe: Session already active\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: Session already " + "active\n", node->nd_ID); LEAVE(EISCONN); } @@ -882,7 +888,8 @@ * If you do it twice you just overwrite. */ if (sp->state != PPPOE_PRIMED) { - printf("pppoe: Session not primed\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: session not " + "primed\n", node->nd_ID); LEAVE(EISCONN); } neg = sp->neg; @@ -1012,7 +1019,7 @@ insert_tag(sp, &uniqtag.hdr); insert_tag(sp, &sp->neg->service.hdr); make_packet(sp); - sendpacket(sp); + ng_pppoe_sendpacket(sp); } static int @@ -1105,7 +1112,8 @@ if( m->m_len < sizeof(*wh)) { m = m_pullup(m, sizeof(*wh)); /* Checks length */ if (m == NULL) { - printf("couldn't m_pullup\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: couldn't " + "m_pullup(wh)\n", node->nd_ID); LEAVE(ENOBUFS); } } @@ -1124,7 +1132,10 @@ if( m->m_len < m->m_pkthdr.len) { m = m_pullup(m, m->m_pkthdr.len); if (m == NULL) { - printf("couldn't m_pullup\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: " + "couldn't " + "m_pullup(pkthdr)\n", + node->nd_ID); LEAVE(ENOBUFS); } } @@ -1147,7 +1158,8 @@ } } if (m == NULL) { - printf("packet fragmented\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: packet " + "fragmented\n", node->nd_ID); LEAVE(EMSGSIZE); } } @@ -1204,13 +1216,15 @@ utag = get_tag(ph, PTT_HOST_UNIQ); if ((utag == NULL) || (ntohs(utag->tag_len) != sizeof(sp))) { - printf("no host unique field\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: no host " + "unique field\n", node->nd_ID); LEAVE(ENETUNREACH); } sendhook = pppoe_finduniq(node, utag); if (sendhook == NULL) { - printf("no matching session\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: no " + "matching session\n", node->nd_ID); LEAVE(ENETUNREACH); } @@ -1220,7 +1234,8 @@ */ sp = NG_HOOK_PRIVATE(sendhook); if (sp->state != PPPOE_SINIT) { - printf("session in wrong state\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: session " + "in wrong state\n", node->nd_ID); LEAVE(ENETUNREACH); } neg = sp->neg; @@ -1249,7 +1264,7 @@ scan_tags(sp, ph); make_packet(sp); sp->state = PPPOE_SREQ; - sendpacket(sp); + ng_pppoe_sendpacket(sp); break; case PADR_CODE: @@ -1311,7 +1326,7 @@ scan_tags(sp, ph); make_packet(sp); sp->state = PPPOE_NEWCONNECTED; - sendpacket(sp); + ng_pppoe_sendpacket(sp); /* * Having sent the last Negotiation header, * Set up the stored packet header to @@ -1560,7 +1575,7 @@ insert_tag(sp, &uniqtag.hdr); scan_tags(sp, ph); make_packet(sp); - sendpacket(sp); + ng_pppoe_sendpacket(sp); break; /* @@ -1655,8 +1670,9 @@ /* Generate a packet of that type. */ MGETHDR(m, M_DONTWAIT, MT_DATA); - if(m == NULL) - printf("pppoe: Session out of mbufs\n"); + if (m == NULL) + log(LOG_NOTICE, "ng_pppoe[%x]: session out of " + "mbufs\n", node->nd_ID); else { m->m_pkthdr.rcvif = NULL; m->m_pkthdr.len = m->m_len = sizeof(*wh); @@ -1749,13 +1765,14 @@ break; default: /* Timeouts have no meaning in other states. */ - printf("pppoe: unexpected timeout\n"); + log(LOG_NOTICE, "ng_pppoe[%x]: unexpected timeout\n", + node->nd_ID); } } static void -sendpacket(sessp sp) +ng_pppoe_sendpacket(sessp sp) { struct mbuf *m0 = NULL; hook_p hook = sp->hook; @@ -1770,7 +1787,8 @@ case PPPOE_DEAD: case PPPOE_SNONE: case PPPOE_CONNECTED: - printf("pppoe: sendpacket: unexpected state\n"); + log(LOG_NOTICE, "%s: unexpected state %d\n", + __func__, sp->state); break; case PPPOE_NEWCONNECTED: >>> TRUNCATED FOR MAIL (1000 lines) <<<