svn commit: r247698 - head/sys/kern
Author: mav Date: Sun Mar 3 09:11:24 2013 New Revision: 247698 URL: http://svnweb.freebsd.org/changeset/base/247698 Log: MFcalloutng: Some whitespace fixes. Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c == --- head/sys/kern/kern_timeout.cSun Mar 3 09:09:59 2013 (r247697) +++ head/sys/kern/kern_timeout.cSun Mar 3 09:11:24 2013 (r247698) @@ -205,7 +205,7 @@ cc_cme_migrating(struct callout_cpu *cc) } /* - * kern_timeout_callwheel_alloc() - kernel low level callwheel initialization + * kern_timeout_callwheel_alloc() - kernel low level callwheel initialization * * This code is called very early in the kernel initialization sequence, * and may be called more then once. @@ -704,7 +704,7 @@ softclock(void *arg) * Initialize a handle so that using it with untimeout is benign. * * See ATT BCI Driver Reference Manual for specification. This - * implementation differs from that one in that although an + * implementation differs from that one in that although an * identification value is returned from timeout, the original * arguments to timeout as well as the identifier are used to * identify entries for untimeout. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247705 - in head/usr.sbin/pc-sysinstall: backend examples
Author: jpaetzel Date: Sun Mar 3 09:47:47 2013 New Revision: 247705 URL: http://svnweb.freebsd.org/changeset/base/247705 Log: Fix a bug extracting files from dist scheme Obtained from:PC-BSD Modified: head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh head/usr.sbin/pc-sysinstall/backend/functions-parse.sh head/usr.sbin/pc-sysinstall/backend/parseconfig.sh head/usr.sbin/pc-sysinstall/examples/README Modified: head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Sun Mar 3 09:26:58 2013(r247704) +++ head/usr.sbin/pc-sysinstall/backend/functions-extractimage.sh Sun Mar 3 09:47:47 2013(r247705) @@ -29,23 +29,60 @@ . ${BACKEND}/functions-mountoptical.sh +# Performs the extraction of data to disk from FreeBSD dist files +start_extract_dist() +{ + if [ -z $1 ] ; then exit_err Called dist extraction with no directory set!; fi + if [ -z $INSFILE ]; then exit_err Called extraction with no install file set!; fi + local DDIR=$1 + + # Check if we are doing an upgrade, and if so use our exclude list + if [ ${INSTALLMODE} = upgrade ]; then + TAROPTS=-X ${PROGDIR}/conf/exclude-from-upgrade + else + TAROPTS= + fi + + # Loop though and extract dist files + for di in $INSFILE + do + # Check the MANIFEST see if we have an archive size / count + if [ -e ${DDIR}/MANIFEST ]; then + count=`grep ^${di}.txz ${DDIR}/MANIFEST | awk '{print $3}'` +if [ ! -z $count ] ; then +echo INSTALLCOUNT: $count +fi + fi + echo_log pc-sysinstall: Starting Extraction (${di}) + tar -xpv -C ${FSMNT} -f ${DDIR}/${di}.txz ${TAROPTS} 1 21 + if [ $? -ne 0 ]; then +exit_err ERROR: Failed extracting the dist file: $di + fi + done + + # Check if this was a FTP download and clean it up now + if [ ${INSTALLMEDIUM} = ftp ]; then +echo_log Cleaning up downloaded archives +rm -rf ${DDIR} + fi + + echo_log pc-sysinstall: Extraction Finished +} + # Performs the extraction of data to disk from a uzip or tar archive start_extract_uzip_tar() { - if [ -z $INSFILE ] - then + if [ -z $INSFILE ]; then exit_err ERROR: Called extraction with no install file set! fi # Check if we have a .count file, and echo it out for a front-end to use in progress bars - if [ -e ${INSFILE}.count ] - then + if [ -e ${INSFILE}.count ]; then echo INSTALLCOUNT: `cat ${INSFILE}.count` fi # Check if we are doing an upgrade, and if so use our exclude list - if [ ${INSTALLMODE} = upgrade ] - then + if [ ${INSTALLMODE} = upgrade ]; then TAROPTS=-X ${PROGDIR}/conf/exclude-from-upgrade else TAROPTS= @@ -87,9 +124,8 @@ start_extract_uzip_tar() mdconfig -d -u ${MDDEVICE} ;; tar) - tar -xpv -C ${FSMNT} -f ${INSFILE} ${TAROPTS} 1 21 - if [ $? -ne 0 ] - then + tar -xpv -C ${FSMNT} -f ${INSFILE} ${TAROPTS} 1 21 + if [ $? -ne 0 ]; then exit_err ERROR: Failed extracting the tar image fi ;; @@ -176,6 +212,38 @@ start_extract_split() echo_log pc-sysinstall: Extraction Finished }; +# Function which will attempt to fetch the dist file(s) before we start +fetch_dist_file() +{ + get_value_from_cfg ftpPath + if [ -z $VAL ] + then +exit_err ERROR: Install medium was set to ftp, but no ftpPath was provided! + fi + + FTPPATH=${VAL} + + # Check if we have a /usr partition to save the download + if [ -d ${FSMNT}/usr ] + then +DLDIR=${FSMNT}/usr/.fetch.$$ + else +DLDIR=${FSMNT}/.fetch.$$ + fi + mkdir -p ${DLDIR} + + # Do the fetch of the dist archive(s) now + for di in $INSFILE + do +fetch_file ${FTPPATH}/${di}.txz ${DLDIR}/${di}.txz 1 + done + + # Check to see if there is a MANIFEST file for this install + fetch_file ${FTPPATH}/MANIFEST ${DLDIR}/MANIFEST 0 + + export DLDIR +}; + # Function which will attempt to fetch the install file before we start # the install fetch_install_file() @@ -390,6 +458,13 @@ init_extraction() case $PACKAGETYPE in uzip) INSFILE=${FBSD_UZIP_FILE} ;; tar) INSFILE=${FBSD_TAR_FILE} ;; +dist) + get_value_from_cfg_with_spaces distFiles + if [ -z $VAL ] ; then +exit_err No dist files specified! + fi + INSFILE=${VAL} + ;; split) INSDIR=${FBSD_BRANCH_DIR} @@ -401,6 +476,13 @@ init_extraction() case $PACKAGETYPE in uzip) INSFILE=${UZIP_FILE} ;; tar) INSFILE=${TAR_FILE} ;; +dist) + get_value_from_cfg_with_spaces distFiles + if [ -z $VAL ] ; then +exit_err No dist files specified! + fi + INSFILE=${VAL} + ;; esac fi export INSFILE @@ -417,22 +499,32 @@ init_extraction()
svn commit: r247709 - head
Author: antoine Date: Sun Mar 3 11:09:55 2013 New Revision: 247709 URL: http://svnweb.freebsd.org/changeset/base/247709 Log: Add more obsolete files. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Sun Mar 3 10:52:41 2013(r247708) +++ head/ObsoleteFiles.inc Sun Mar 3 11:09:55 2013(r247709) @@ -39,6 +39,8 @@ # done # 20130302: NTFS support removed +OLD_FILES+=rescue/mount_ntfs +OLD_FILES+=sbin/mount_ntfs OLD_FILES+=usr/include/fs/ntfs/ntfs.h OLD_FILES+=usr/include/fs/ntfs/ntfs_compr.h OLD_FILES+=usr/include/fs/ntfs/ntfs_ihash.h @@ -51,6 +53,7 @@ OLD_FILES+=usr/share/man/man8/mount_ntfs # 20130302: PORTALFS support removed OLD_FILES+=usr/include/fs/portalfs/portal.h OLD_DIRS+=usr/include/fs/portalfs +OLD_FILES+=usr/sbin/mount_portalfs OLD_FILES+=usr/share/examples/portal/README OLD_FILES+=usr/share/examples/portal/portal.conf OLD_DIRS+=usr/share/examples/portal @@ -79,9 +82,10 @@ OLD_DIRS+=var/remote # 20121114: zpool-features manual page moved from section 5 to 7 OLD_FILES+=usr/share/man/man5/zpool-features.5.gz # 20121022: remove harp, hfa and idt man page -OLD_FILES+=share/man/man4/harp.4 -OLD_FILES+=share/man/man4/hfa.4 -OLD_FILES+=share/man/man4/idt.4 +OLD_FILES+=usr/share/man/man4/harp.4.gz +OLD_FILES+=usr/share/man/man4/hfa.4.gz +OLD_FILES+=usr/share/man/man4/idt.4.gz +OLD_FILES+=usr/share/man/man4/if_idt.4.gz # 20121022: VFS_LOCK_GIANT elimination OLD_FILES+=usr/share/man/man9/VFS_LOCK_GIANT.9.gz OLD_FILES+=usr/share/man/man9/VFS_UNLOCK_GIANT.9.gz ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r247709 - head
On Sun, Mar 3, 2013 at 12:09 PM, Antoine Brodin anto...@freebsd.org wrote: Author: antoine Date: Sun Mar 3 11:09:55 2013 New Revision: 247709 URL: http://svnweb.freebsd.org/changeset/base/247709 Log: Add more obsolete files. Pointy hat to me (most of). Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r247683 - head/lib/libedit
On Sun, Mar 03, 2013 at 02:11:04AM +, Pedro F. Giffuni wrote: Author: pfg Date: Sun Mar 3 02:11:03 2013 New Revision: 247683 URL: http://svnweb.freebsd.org/changeset/base/247683 Log: libedit does not need to be linked with ncurses libedit uses the terminfo headers but doesn't really need to be linked with ncurses. Discussed with: christos@NetBSD MFC after; 3 days Modified: head/lib/libedit/Makefile Modified: head/lib/libedit/Makefile == --- head/lib/libedit/Makefile Sun Mar 3 01:36:31 2013(r247682) +++ head/lib/libedit/Makefile Sun Mar 3 02:11:03 2013(r247683) @@ -11,7 +11,6 @@ OSRCS= chared.c common.c el.c emacs.c fc parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c DPADD= ${LIBNCURSES} -LDADD= -lncurses MAN= editline.3 editrc.5 This is wrong. libedit.so uses symbols such as tgetent from libcurses.so, so it should be linked to libcurses.so. These symbols are easily visible in the output of objdump -T /lib/libedit.so.7 because they are unversioned. There is not much breakage because most applications using libedit explicitly link to libcurses, since that is required for static linking. For dynamic linking it is really a case of overlinking, particularly because libedit completely abstracts away libcurses from the application's point of view (in other words, the application need not call libcurses itself). More subtle breakage will result if libcurses.so starts using versioned symbols and libedit.so uses a symbol with more than one version, as rtld will then give it the oldest version where libedit.so expects a newer version. Perhaps we should add -Wl,--no-undefined to SOLINKOPTS in bsd.lib.mk with the exception of libraries that deliberately have undefined symbols (for example, to be supplied by the application). -- Jilles Tjoelker ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247712 - head/sbin/ipfw
Author: melifaro Date: Sun Mar 3 14:05:03 2013 New Revision: 247712 URL: http://svnweb.freebsd.org/changeset/base/247712 Log: Implement buffer size checking in ipfw(8) add cmd. PR: bin/65961 Submitted by: Eugene Grosbein eu...@grosbein.pp.ru MFC after:2 weeks Modified: head/sbin/ipfw/ipfw2.c head/sbin/ipfw/ipfw2.h head/sbin/ipfw/ipv6.c Modified: head/sbin/ipfw/ipfw2.c == --- head/sbin/ipfw/ipfw2.c Sun Mar 3 13:53:58 2013(r247711) +++ head/sbin/ipfw/ipfw2.c Sun Mar 3 14:05:03 2013(r247712) @@ -64,6 +64,22 @@ int ipfw_socket = -1; #define s6_addr32 __u6_addr.__u6_addr32 #endif +#defineCHECK_LENGTH(v, len) do { \ + if ((v) (len))\ + errx(EX_DATAERR, Rule too long); \ + } while (0) +/* + * Check if we have enough space in cmd buffer. Note that since + * first 8? u32 words are reserved by reserved header, full cmd + * buffer can't be used, so we need to protect from buffer overrun + * only. At the beginnig, cblen is less than actual buffer size by + * size of ipfw_insn_u32 instruction + 1 u32 work. This eliminates need + * for checking small instructions fitting in given range. + * We also (ab)use the fact that ipfw_insn is always the first field + * for any custom instruction. + */ +#defineCHECK_CMDLENCHECK_LENGTH(cblen, F_LEN((ipfw_insn *)cmd)) + #define GET_UINT_ARG(arg, min, max, tok, s_x) do { \ if (!av[0]) \ errx(EX_USAGE, %s: missing argument, match_value(s_x, tok)); \ @@ -653,7 +669,7 @@ strtoport(char *s, char **end, int base, * Fill the body of the command with the list of port ranges. */ static int -fill_newports(ipfw_insn_u16 *cmd, char *av, int proto) +fill_newports(ipfw_insn_u16 *cmd, char *av, int proto, int cblen) { uint16_t a, b, *p = cmd-ports; int i = 0; @@ -664,6 +680,8 @@ fill_newports(ipfw_insn_u16 *cmd, char * if (s == av)/* empty or invalid argument */ return (0); + CHECK_LENGTH(cblen, i + 2); + switch (*s) { case '-': /* a range */ av = s + 1; @@ -2068,7 +2086,7 @@ lookup_host (char *host, struct in_addr * We can have multiple comma-separated address/mask entries. */ static void -fill_ip(ipfw_insn_ip *cmd, char *av) +fill_ip(ipfw_insn_ip *cmd, char *av, int cblen) { int len = 0; uint32_t *d = ((ipfw_insn_u32 *)cmd)-d; @@ -2108,6 +2126,8 @@ fill_ip(ipfw_insn_ip *cmd, char *av) int masklen; char md, nd = '\0'; + CHECK_LENGTH(cblen, F_INSN_SIZE(ipfw_insn) + 2 + len); + if (p) { md = *p; *p++ = '\0'; @@ -2366,11 +2386,13 @@ ipfw_delete(char *av[]) * patterns which match interfaces. */ static void -fill_iface(ipfw_insn_if *cmd, char *arg) +fill_iface(ipfw_insn_if *cmd, char *arg, int cblen) { cmd-name[0] = '\0'; cmd-o.len |= F_INSN_SIZE(ipfw_insn_if); + CHECK_CMDLEN; + /* Parse the interface or address */ if (strcmp(arg, any) == 0) cmd-o.len = 0; /* effectively ignore this command */ @@ -2441,8 +2463,10 @@ get_mac_addr_mask(const char *p, uint8_t * the new command in case it has been clobbered before. */ static ipfw_insn * -next_cmd(ipfw_insn *cmd) +next_cmd(ipfw_insn *cmd, int *len) { + *len -= F_LEN(cmd); + CHECK_LENGTH(*len, 0); cmd += F_LEN(cmd); bzero(cmd, sizeof(*cmd)); return cmd; @@ -2452,7 +2476,7 @@ next_cmd(ipfw_insn *cmd) * Takes arguments and copies them into a comment */ static void -fill_comment(ipfw_insn *cmd, char **av) +fill_comment(ipfw_insn *cmd, char **av, int cblen) { int i, l; char *p = (char *)(cmd + 1); @@ -2470,6 +2494,8 @@ fill_comment(ipfw_insn *cmd, char **av) comment too long (max 80 chars)); l = 1 + (l+3)/4; cmd-len = (cmd-len (F_NOT | F_OR)) | l; + CHECK_CMDLEN; + for (i = 0; av[i] != NULL; i++) { strcpy(p, av[i]); p += strlen(av[i]); @@ -2495,7 +2521,7 @@ fill_cmd(ipfw_insn *cmd, enum ipfw_opcod * two microinstructions, and returns the pointer to the last one. */ static ipfw_insn * -add_mac(ipfw_insn *cmd, char *av[]) +add_mac(ipfw_insn *cmd, char *av[], int cblen) { ipfw_insn_mac *mac; @@ -2504,6 +2530,7 @@ add_mac(ipfw_insn *cmd, char *av[]) cmd-opcode = O_MACADDR2; cmd-len = (cmd-len (F_NOT | F_OR)) | F_INSN_SIZE(ipfw_insn_mac); + CHECK_CMDLEN; mac = (ipfw_insn_mac *)cmd; get_mac_addr_mask(av[0], mac-addr, mac-mask); /* dst */ @@ -2513,12 +2540,13 @@
svn commit: r247713 - head/lib/libedit
Author: jilles Date: Sun Mar 3 14:42:15 2013 New Revision: 247713 URL: http://svnweb.freebsd.org/changeset/base/247713 Log: libedit: Revert r247683 to fix buildworld. I think r247683 is wrong because libedit.so actually uses symbols from libcurses.so. Since it breaks the build, revert it now. Modified: head/lib/libedit/Makefile Modified: head/lib/libedit/Makefile == --- head/lib/libedit/Makefile Sun Mar 3 14:05:03 2013(r247712) +++ head/lib/libedit/Makefile Sun Mar 3 14:42:15 2013(r247713) @@ -11,6 +11,7 @@ OSRCS=chared.c common.c el.c emacs.c fc parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c DPADD= ${LIBNCURSES} +LDADD= -lncurses MAN= editline.3 editrc.5 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r247683 - head/lib/libedit
On Sun, Mar 03, 2013 at 02:43:14PM +0100, Jilles Tjoelker wrote: On Sun, Mar 03, 2013 at 02:11:04AM +, Pedro F. Giffuni wrote: Author: pfg Date: Sun Mar 3 02:11:03 2013 New Revision: 247683 URL: http://svnweb.freebsd.org/changeset/base/247683 Log: libedit does not need to be linked with ncurses libedit uses the terminfo headers but doesn't really need to be linked with ncurses. Discussed with: christos@NetBSD MFC after;3 days Modified: head/lib/libedit/Makefile Modified: head/lib/libedit/Makefile == --- head/lib/libedit/Makefile Sun Mar 3 01:36:31 2013 (r247682) +++ head/lib/libedit/Makefile Sun Mar 3 02:11:03 2013 (r247683) @@ -11,7 +11,6 @@ OSRCS=chared.c common.c el.c emacs.c fc parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c DPADD= ${LIBNCURSES} -LDADD= -lncurses MAN= editline.3 editrc.5 This is wrong. libedit.so uses symbols such as tgetent from libcurses.so, so it should be linked to libcurses.so. These symbols are easily visible in the output of objdump -T /lib/libedit.so.7 because they are unversioned. There is not much breakage because most applications using libedit explicitly link to libcurses, since that is required for static linking. For dynamic linking it is really a case of overlinking, particularly because libedit completely abstracts away libcurses from the application's point of view (in other words, the application need not call libcurses itself). This actually happens in buildworld, so I have taken the liberty to revert your commit. -- Jilles Tjoelker ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247714 - in head/sys: kern sys
Author: davide Date: Sun Mar 3 14:47:02 2013 New Revision: 247714 URL: http://svnweb.freebsd.org/changeset/base/247714 Log: Remove a couple of unused include. Modified: head/sys/kern/kern_timeout.c head/sys/sys/systm.h Modified: head/sys/kern/kern_timeout.c == --- head/sys/kern/kern_timeout.cSun Mar 3 14:42:15 2013 (r247713) +++ head/sys/kern/kern_timeout.cSun Mar 3 14:47:02 2013 (r247714) @@ -43,7 +43,6 @@ __FBSDID($FreeBSD$); #include sys/systm.h #include sys/bus.h #include sys/callout.h -#include sys/condvar.h #include sys/interrupt.h #include sys/kernel.h #include sys/ktr.h Modified: head/sys/sys/systm.h == --- head/sys/sys/systm.hSun Mar 3 14:42:15 2013(r247713) +++ head/sys/sys/systm.hSun Mar 3 14:47:02 2013(r247714) @@ -44,7 +44,6 @@ #include sys/cdefs.h #include sys/queue.h #include sys/stdint.h/* for people using printf mainly */ -#include sys/time.h extern int cold; /* nonzero if we are doing a cold boot */ extern int rebooting; /* kern_reboot() has been called. */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247715 - head/sys/kern
Author: davide Date: Sun Mar 3 15:01:33 2013 New Revision: 247715 URL: http://svnweb.freebsd.org/changeset/base/247715 Log: callwheelmask and callwheelsize are always greater than zero. Switch their type to u_int. Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c == --- head/sys/kern/kern_timeout.cSun Mar 3 14:47:02 2013 (r247714) +++ head/sys/kern/kern_timeout.cSun Mar 3 15:01:33 2013 (r247715) @@ -83,7 +83,7 @@ SYSCTL_INT(_debug, OID_AUTO, to_avg_mpca * TODO: * allocate more timeout table slots when table overflows. */ -int callwheelsize, callwheelmask; +u_int callwheelsize, callwheelmask; /* * The callout cpu migration entity represents informations necessary for ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247716 - head
Author: jilles Date: Sun Mar 3 15:02:56 2013 New Revision: 247716 URL: http://svnweb.freebsd.org/changeset/base/247716 Log: MAINTAINERS: Document my maintainership of sh(1). Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSSun Mar 3 15:01:33 2013(r247715) +++ head/MAINTAINERSSun Mar 3 15:02:56 2013(r247716) @@ -124,3 +124,6 @@ isci(4) jimharris Pre-commit review req cmxdan...@roe.ch Pre-commit review preferred. filemonobrien Pre-commit review preferred. sysdoc trhodes Pre-commit review preferred. +sh(1) jilles Pre-commit review requested. This also applies + to kill(1), printf(1) and test(1) which are + compiled in as builtins. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
Re: svn commit: r247713 - head/lib/libedit
On 03/03/2013 09:42, Jilles Tjoelker wrote: Author: jilles Date: Sun Mar 3 14:42:15 2013 New Revision: 247713 URL: http://svnweb.freebsd.org/changeset/base/247713 Log: libedit: Revert r247683 to fix buildworld. I think r247683 is wrong because libedit.so actually uses symbols from libcurses.so. Since it breaks the build, revert it now. Modified: head/lib/libedit/Makefile Modified: head/lib/libedit/Makefile == --- head/lib/libedit/Makefile Sun Mar 3 14:05:03 2013(r247712) +++ head/lib/libedit/Makefile Sun Mar 3 14:42:15 2013(r247713) @@ -11,6 +11,7 @@ OSRCS=chared.c common.c el.c emacs.c fc parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c DPADD= ${LIBNCURSES} +LDADD= -lncurses MAN= editline.3 editrc.5 Thank you for reverting. My router broke this morning or I would've done it first. I have no idea why NetBSD survives without linking ncurses here but next time I will test this further before trusting the package author. Pedro. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247719 - head/sys/modules/mqueue
Author: uqs Date: Sun Mar 3 16:17:09 2013 New Revision: 247719 URL: http://svnweb.freebsd.org/changeset/base/247719 Log: Fix 'make depend' Modified: head/sys/modules/mqueue/Makefile Modified: head/sys/modules/mqueue/Makefile == --- head/sys/modules/mqueue/MakefileSun Mar 3 16:16:10 2013 (r247718) +++ head/sys/modules/mqueue/MakefileSun Mar 3 16:17:09 2013 (r247719) @@ -5,6 +5,6 @@ KMOD= mqueuefs SRCS= uipc_mqueue.c \ vnode_if.h \ - opt_posix.h opt_compat.h + opt_posix.h opt_compat.h opt_capsicum.h .include bsd.kmod.mk ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247720 - in head: bin/sh tools/regression/bin/sh/builtins
Author: jilles Date: Sun Mar 3 17:33:59 2013 New Revision: 247720 URL: http://svnweb.freebsd.org/changeset/base/247720 Log: sh: When executing a trap, keep exit status along with evalskip. This ensures 'return' in a trap returns the correct status to the caller. If evalskip is not set or if it is overridden by a previous evalskip, keep the old behaviour of restoring the exit status from before the trap. Added: head/tools/regression/bin/sh/builtins/trap12.0 (contents, props changed) Modified: head/bin/sh/trap.c Modified: head/bin/sh/trap.c == --- head/bin/sh/trap.c Sun Mar 3 16:17:09 2013(r247719) +++ head/bin/sh/trap.c Sun Mar 3 17:33:59 2013(r247720) @@ -455,7 +455,6 @@ dotrap(void) last_trapsig = i; savestatus = exitstatus; evalstring(trap[i], 0); - exitstatus = savestatus; /* * If such a command was not @@ -464,9 +463,11 @@ dotrap(void) * trap action to have an effect * outside of it. */ - if (prev_evalskip != 0) { + if (evalskip == 0 || + prev_evalskip != 0) { evalskip = prev_evalskip; skipcount = prev_skipcount; + exitstatus = savestatus; } if (i == SIGCHLD) Added: head/tools/regression/bin/sh/builtins/trap12.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/trap12.0 Sun Mar 3 17:33:59 2013(r247720) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +f() { + trap 'return 42' USR1 + kill -USR1 $$ + return 3 +} +f +r=$? +[ $r = 42 ] ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247725 - head/share/man/man4
Author: mav Date: Sun Mar 3 19:10:28 2013 New Revision: 247725 URL: http://svnweb.freebsd.org/changeset/base/247725 Log: Fix typos in hint names. MFC after:1 week Modified: head/share/man/man4/mvs.4 Modified: head/share/man/man4/mvs.4 == --- head/share/man/man4/mvs.4 Sun Mar 3 19:02:23 2013(r247724) +++ head/share/man/man4/mvs.4 Sun Mar 3 19:10:28 2013(r247725) @@ -24,7 +24,7 @@ .\ .\ $FreeBSD$ .\ -.Dd April 27, 2010 +.Dd March 3, 2013 .Dt MVS 4 .Os .Sh NAME @@ -62,7 +62,7 @@ command latency. .It Va hint.mvs. Ns Ar X Ns Va . defines number of completed commands for CCC, which trigger interrupt without waiting for specified coalescing timeout. -.It Va hint.mvs. Ns Ar X Ns Va .pm_level +.It Va hint.mvsch. Ns Ar X Ns Va .pm_level controls SATA interface Power Management for the specified channel, allowing some power to be saved at the cost of additional command latency. @@ -82,7 +82,7 @@ driver initiates SLUMBER PM state transi Note that interface Power Management is not compatible with device presence detection. A manual bus reset is needed on device hot-plug. -.It Va hint.mvs. Ns Ar X Ns Va .sata_rev +.It Va hint.mvsch. Ns Ar X Ns Va .sata_rev setting to nonzero value limits maximum SATA revision (speed). Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps. .El ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247730 - head/usr.bin/find
Author: dwmalone Date: Sun Mar 3 20:10:56 2013 New Revision: 247730 URL: http://svnweb.freebsd.org/changeset/base/247730 Log: Add an option for finding sparse files. Reviewed by: iedowse MFC after:3 weeks Modified: head/usr.bin/find/extern.h head/usr.bin/find/find.1 head/usr.bin/find/function.c head/usr.bin/find/option.c Modified: head/usr.bin/find/extern.h == --- head/usr.bin/find/extern.h Sun Mar 3 19:31:44 2013(r247729) +++ head/usr.bin/find/extern.h Sun Mar 3 20:10:56 2013(r247730) @@ -73,6 +73,7 @@ creat_f c_regex; creat_fc_samefile; creat_fc_simple; creat_fc_size; +creat_fc_sparse; creat_fc_type; creat_fc_user; creat_fc_xdev; @@ -109,6 +110,7 @@ exec_f f_prune; exec_f f_quit; exec_f f_regex; exec_f f_size; +exec_f f_sparse; exec_f f_type; exec_f f_user; Modified: head/usr.bin/find/find.1 == --- head/usr.bin/find/find.1Sun Mar 3 19:31:44 2013(r247729) +++ head/usr.bin/find/find.1Sun Mar 3 20:10:56 2013(r247730) @@ -816,6 +816,10 @@ terabytes (1024 gigabytes) .It Cm P petabytes (1024 terabytes) .El +.It Ic -sparse +True if the current file is sparse, +i.e. has fewer blocks allocated than expected based on its size in bytes. +This might also match files that have been compressed by the filesystem. .It Ic -type Ar t True if the file is of the specified type. Possible file types are as follows: @@ -997,7 +1001,7 @@ and as well as .Ic -amin , -anewer , -cmin , -cnewer , -delete , -empty , -fstype , .Ic -iname , -inum , -iregex , -ls , -maxdepth , -mindepth , -mmin , -.Ic -path , -print0 , -regex +.Ic -path , -print0 , -regex, -sparse and all of the .Ic -B* birthtime related primaries are extensions to Modified: head/usr.bin/find/function.c == --- head/usr.bin/find/function.cSun Mar 3 19:31:44 2013 (r247729) +++ head/usr.bin/find/function.cSun Mar 3 20:10:56 2013 (r247730) @@ -1497,6 +1497,29 @@ c_size(OPTION *option, char ***argvp) } /* + * -sparse functions -- + * + * Check if a file is sparse by finding if it occupies fewer blocks + * than we expect based on its size. + */ +int +f_sparse(PLAN *plan __unused, FTSENT *entry) +{ + off_t expected_blocks; + + expected_blocks = (entry-fts_statp-st_size + 511) / 512; + return entry-fts_statp-st_blocks expected_blocks; +} + +PLAN * +c_sparse(OPTION *option, char ***argvp __unused) +{ + ftsoptions = ~FTS_NOSTAT; + + return palloc(option); +} + +/* * -type c functions -- * * True if the type of the file is c, where c is b, c, d, p, f or w Modified: head/usr.bin/find/option.c == --- head/usr.bin/find/option.c Sun Mar 3 19:31:44 2013(r247729) +++ head/usr.bin/find/option.c Sun Mar 3 20:10:56 2013(r247730) @@ -145,6 +145,7 @@ static OPTION const options[] = { { -regex, c_regex,f_regex,0 }, { -samefile, c_samefile, f_inum, 0 }, { -size, c_size, f_size, 0 }, + { -sparse,c_sparse, f_sparse, 0 }, { -true, c_simple, f_always_true, 0 }, { -type, c_type, f_type, 0 }, { -uid, c_user, f_user, 0 }, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247734 - head/usr.sbin/pc-sysinstall/backend
Author: jpaetzel Date: Sun Mar 3 23:01:46 2013 New Revision: 247734 URL: http://svnweb.freebsd.org/changeset/base/247734 Log: Improves and enhances using the installPackages= variable. Adds pkgExt= variable to set if pkgs are .tbz or .txz or other. Auto-detects if packages are PKGNG or old PKG format. Auto-bootstrap of PKGNG for the new installed environment. Fixes issues with installing packages from local media, such as DVD/USB. Switch to using a space-delimiter for installPackages, since a number of packages use a , in their version string. Fix pc-sysinstall to ignore install scripts, and not hang on user interaction prompts when installing pkgs. Add pkg2ng command as apart of pkgng bootstrap process. Obtained from:PC-BSD Modified: head/usr.sbin/pc-sysinstall/backend/functions-installpackages.sh head/usr.sbin/pc-sysinstall/backend/functions-packages.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-installpackages.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-installpackages.shSun Mar 3 22:33:13 2013(r247733) +++ head/usr.sbin/pc-sysinstall/backend/functions-installpackages.shSun Mar 3 23:01:46 2013(r247734) @@ -76,50 +76,113 @@ fetch_package_dependencies() # Check for any packages specified, and begin loading them install_packages() { + echo Checking for packages to install... + sleep 2 + # First, lets check and see if we even have any packages to install get_value_from_cfg installPackages - if [ -n ${VAL} ] - then -HERE=`pwd` -rc_nohalt mkdir -p ${FSMNT}/${PKGTMPDIR} -rc_nohalt cd ${FSMNT}/${PKGTMPDIR} -if [ ! -f ${CONFDIR}/INDEX ] + # Nothing to do? + if [ -z ${VAL} ]; then return; fi + + echo Installing packages... + sleep 3 + + local PKGPTH + + HERE=`pwd` + rc_halt mkdir -p ${FSMNT}${PKGTMPDIR} + + # Determine the directory we will install packages from + get_package_location + rc_halt cd ${PKGDLDIR} + + # Set the location of the INDEXFILE + INDEXFILE=${TMPDIR}/INDEX + + if [ ! -f ${INDEXFILE} ]; then +get_package_index + fi + + if [ ! -f ${TMPDIR}/INDEX.parsed -a $INSTALLMEDIUM = ftp ]; then +parse_package_index + fi + + # What extension are we using for pkgs? + PKGEXT=txz + get_value_from_cfg pkgExt + if [ -n ${VAL} ]; then + strip_white_space ${VAL} + PKGEXT=$VAL + fi + export PKGEXT + + # We dont want to be bothered with scripts asking questions + PACKAGE_BUILDING=yes + export PACKAGE_BUILDING + + # Lets start by cleaning up the string and getting it ready to parse + get_value_from_cfg_with_spaces installPackages + PACKAGES=${VAL} + echo_log Packages to install: `echo $PACKAGES | wc -w | awk '{print $1}'` + for i in $PACKAGES + do +if ! get_package_name ${i} then - get_package_index + echo_log Unable to locate package ${i} + continue +fi + +PKGNAME=${VAL} + +# Fetch package + deps, but skip if installing from local media +if [ ${INSTALLMEDIUM} = ftp ] ; then + DEPFILE=${FSMNT}/${PKGTMPDIR}/.${PKGNAME}.deps + rc_nohalt touch ${DEPFILE} + determine_package_dependencies ${PKGNAME} ${DEPFILE} + fetch_package_dependencies ${DEPFILE} ${FSMNT}/${PKGTMPDIR} fi -if [ ! -f ${CONFDIR}/INDEX.parsed ] +# Set package location +case ${INSTALLMEDIUM} in + usb|dvd|local) PKGPTH=${PKGTMPDIR}/All/${PKGNAME} ;; + *) PKGPTH=${PKGTMPDIR}/${PKGNAME} ;; +esac + +# See if we need to determine the package format we are working with +if [ -z ${PKGINFO} ] ; then + tar tqf ${FSMNT}${PKGPTH} '+MANIFEST' /dev/null 2/dev/null + if [ $? -ne 0 ] ; then +PKGADD=pkg_add -C ${FSMNT} +PKGINFO=pkg_info + else +PKGADD=pkg -c ${FSMNT} add +PKGINFO=pkg info +bootstrap_pkgng + fi +fi + +# If the package is not already installed, install it! +if ! run_chroot_cmd ${PKGINFO} -e ${PKGNAME} /dev/null 2/dev/null then - parse_package_index + echo_log Installing package: ${PKGNAME} + rc_nohalt ${PKGADD} ${PKGPTH} fi -# Lets start by cleaning up the string and getting it ready to parse -strip_white_space ${VAL} -PACKAGES=`echo ${VAL} | sed -e s|,| |g` -for i in $PACKAGES -do - if get_package_name ${i} - then -PKGNAME=${VAL} -DEPFILE=${FSMNT}/${PKGTMPDIR}/.${PKGNAME}.deps - -rc_nohalt touch ${DEPFILE} -determine_package_dependencies ${PKGNAME} ${DEPFILE} -fetch_package_dependencies ${DEPFILE} ${FSMNT}/${PKGTMPDIR} - -# If the package is not already installed, install it! -if ! run_chroot_cmd pkg_info -e ${PKGNAME} -then - rc_nohalt pkg_add -C ${FSMNT} ${PKGTMPDIR}/${PKGNAME}.tbz -fi +if [ ${INSTALLMEDIUM} = ftp ] ; then + rc_nohalt rm ${DEPFILE} +fi -
svn commit: r247735 - in head/usr.sbin/pc-sysinstall: backend conf
Author: jpaetzel Date: Sun Mar 3 23:07:27 2013 New Revision: 247735 URL: http://svnweb.freebsd.org/changeset/base/247735 Log: Use GNOP to force ZFS pools to 4k. Obtained from:PC-BSD Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh head/usr.sbin/pc-sysinstall/backend/functions-disk.sh head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh head/usr.sbin/pc-sysinstall/backend/functions.sh head/usr.sbin/pc-sysinstall/conf/pc-sysinstall.conf Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Sun Mar 3 23:01:46 2013(r247734) +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Sun Mar 3 23:07:27 2013(r247735) @@ -62,7 +62,18 @@ get_fs_line_xvars() echo $ZFSVARS | grep -qE ^(disk|file|mirror|raidz(1|2|3)?|spare|log|cache): 2/dev/null if [ $? -eq 0 ] ; then ZTYPE=`echo $ZFSVARS | cut -f1 -d:` - ZFSVARS=`echo $ZFSVARS | sed s|$ZTYPE: ||g | sed s|$ZTYPE:||g` + tmpVars=`echo $ZFSVARS | sed s|$ZTYPE: ||g | sed s|$ZTYPE:||g` + ZFSVARS= + # make sure we have a '/dev' in front of the extra devices + for i in $tmpVars + do + echo $i | grep -q '/dev/' + if [ $? -ne 0 ] ; then + ZFSVARS=$ZFSVARS /dev/${i} + else + ZFSVARS=$ZFSVARS $i + fi + done fi # Return the ZFS options Modified: head/usr.sbin/pc-sysinstall/backend/functions-disk.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Sun Mar 3 23:01:46 2013(r247734) +++ head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Sun Mar 3 23:07:27 2013(r247735) @@ -33,6 +33,7 @@ is_disk() for _dsk in `sysctl -n kern.disks` do [ $_dsk = ${1} ] return 0 +[ /dev/$_dsk = ${1} ] return 0 done return 1 Modified: head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh Sun Mar 3 23:01:46 2013(r247734) +++ head/usr.sbin/pc-sysinstall/backend/functions-mountdisk.sh Sun Mar 3 23:07:27 2013(r247735) @@ -149,12 +149,12 @@ mount_all_filesystems() for PART in `ls ${PARTDIR}` do PARTDEV=`echo $PART | sed 's|-|/|g'` -if [ ! -e ${PARTDEV} ] +PARTFS=`cat ${PARTDIR}/${PART} | cut -d '#' -f 1` +if [ ! -e ${PARTDEV} -a ${PARTFS} != ZFS ] then exit_err ERROR: The partition ${PARTDEV} does not exist. Failure in bsdlabel? fi -PARTFS=`cat ${PARTDIR}/${PART} | cut -d '#' -f 1` PARTMNT=`cat ${PARTDIR}/${PART} | cut -d '#' -f 2` PARTENC=`cat ${PARTDIR}/${PART} | cut -d '#' -f 3` @@ -186,12 +186,12 @@ mount_all_filesystems() for PART in `ls ${PARTDIR}` do PARTDEV=`echo $PART | sed 's|-|/|g'` -if [ ! -e ${PARTDEV} ] +PARTFS=`cat ${PARTDIR}/${PART} | cut -d '#' -f 1` +if [ ! -e ${PARTDEV} -a ${PARTFS} != ZFS ] then exit_err ERROR: The partition ${PARTDEV} does not exist. Failure in bsdlabel? fi -PARTFS=`cat ${PARTDIR}/${PART} | cut -d '#' -f 1` PARTMNT=`cat ${PARTDIR}/${PART} | cut -d '#' -f 2` PARTENC=`cat ${PARTDIR}/${PART} | cut -d '#' -f 3` Modified: head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Sun Mar 3 23:01:46 2013(r247734) +++ head/usr.sbin/pc-sysinstall/backend/functions-newfs.sh Sun Mar 3 23:07:27 2013(r247735) @@ -60,18 +60,56 @@ setup_zfs_filesystem() fi done - # Check if we have some custom zpool arguments and use them if so if [ ! -z ${ZPOOLOPTS} ] ; then -rc_halt zpool create -m none -f ${ZPOOLNAME} ${ZPOOLOPTS} +# Sort through devices and run gnop on them +local gnopDev= +local newOpts= +for i in $ZPOOLOPTS +do + echo $i | grep -q '/dev/' + if [ $? -eq 0 ] ; then + rc_halt gnop create -S 4096 ${i} + gnopDev=$gnopDev $i + newOpts=$newOpts ${i}.nop + else + newOpts=$newOpts $i + fi +done + +echo_log Creating zpool ${ZPOOLNAME} with $newOpts +rc_halt zpool create -m none -f ${ZPOOLNAME} ${newOpts} + +# Export the pool +rc_halt zpool export ${ZPOOLNAME} + +# Destroy the gnop devices +for i in $gnopDev +do + rc_halt gnop destroy ${i}.nop +done + +# And lastly re-import the pool +rc_halt zpool import ${ZPOOLNAME} else +# Lets do our pseudo-4k drive +rc_halt gnop create -S 4096 ${PART}${EXT} + # No
svn commit: r247736 - in head/sys: kern sys
Author: pjd Date: Sun Mar 3 23:23:35 2013 New Revision: 247736 URL: http://svnweb.freebsd.org/changeset/base/247736 Log: Plug memory leaks in file descriptors passing. Modified: head/sys/kern/kern_descrip.c head/sys/kern/uipc_usrreq.c head/sys/sys/filedesc.h Modified: head/sys/kern/kern_descrip.c == --- head/sys/kern/kern_descrip.cSun Mar 3 23:07:27 2013 (r247735) +++ head/sys/kern/kern_descrip.cSun Mar 3 23:23:35 2013 (r247736) @@ -1397,7 +1397,7 @@ filecaps_copy(const struct filecaps *src /* * Move filecaps structure to the new place and clear the old place. */ -static void +void filecaps_move(struct filecaps *src, struct filecaps *dst) { Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Sun Mar 3 23:07:27 2013(r247735) +++ head/sys/kern/uipc_usrreq.c Sun Mar 3 23:23:35 2013(r247736) @@ -1686,6 +1686,7 @@ unp_freerights(struct filedescent *fde, for (i = 0; i fdcount; i++, fde++) { fp = fde-fde_file; + filecaps_free(fdep-fde_caps); bzero(fde, sizeof(*fde)); unp_discard(fp); } @@ -1760,7 +1761,7 @@ unp_externalize(struct mbuf *control, st panic(unp_externalize fdalloc failed); fde = fdesc-fd_ofiles[f]; fde-fde_file = fdep-fde_file; - filecaps_copy(fdep-fde_caps, fde-fde_caps); + filecaps_move(fdep-fde_caps, fde-fde_caps); unp_externalize_fp(fde-fde_file); *fdp = f; } Modified: head/sys/sys/filedesc.h == --- head/sys/sys/filedesc.h Sun Mar 3 23:07:27 2013(r247735) +++ head/sys/sys/filedesc.h Sun Mar 3 23:23:35 2013(r247736) @@ -136,6 +136,7 @@ struct thread; void filecaps_init(struct filecaps *fcaps); void filecaps_copy(const struct filecaps *src, struct filecaps *dst); +void filecaps_move(struct filecaps *src, struct filecaps *dst); void filecaps_free(struct filecaps *fcaps); intclosef(struct file *fp, struct thread *td); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247737 - head/sys/kern
Author: pjd Date: Sun Mar 3 23:25:45 2013 New Revision: 247737 URL: http://svnweb.freebsd.org/changeset/base/247737 Log: Use dedicated malloc type for filecaps-related data, so we can detect any memory leaks easier. Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c == --- head/sys/kern/kern_descrip.cSun Mar 3 23:23:35 2013 (r247736) +++ head/sys/kern/kern_descrip.cSun Mar 3 23:25:45 2013 (r247737) @@ -104,6 +104,7 @@ static MALLOC_DEFINE(M_FILEDESC, filede static MALLOC_DEFINE(M_FILEDESC_TO_LEADER, filedesc_to_leader, file desc to leader structures); static MALLOC_DEFINE(M_SIGIO, sigio, sigio structures); +MALLOC_DEFINE(M_FILECAPS, filecaps, descriptor capabilities); MALLOC_DECLARE(M_FADVISE); @@ -1389,7 +1390,7 @@ filecaps_copy(const struct filecaps *src (fc_ioctls != NULL, but fc_nioctls=%hd, src-fc_nioctls)); size = sizeof(src-fc_ioctls[0]) * src-fc_nioctls; - dst-fc_ioctls = malloc(size, M_TEMP, M_WAITOK); + dst-fc_ioctls = malloc(size, M_FILECAPS, M_WAITOK); bcopy(src-fc_ioctls, dst-fc_ioctls, size); } } @@ -1425,7 +1426,7 @@ void filecaps_free(struct filecaps *fcaps) { - free(fcaps-fc_ioctls, M_TEMP); + free(fcaps-fc_ioctls, M_FILECAPS); bzero(fcaps, sizeof(*fcaps)); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247740 - head/sys/kern
Author: pjd Date: Sun Mar 3 23:39:30 2013 New Revision: 247740 URL: http://svnweb.freebsd.org/changeset/base/247740 Log: For some reason when I started to pass filedescent structures instead of pointers to the file structure receiving descriptors stopped to work when also at least few kilobytes of data is being send. In the kernel the soreceive_generic() function doesn't see control mbuf as the first mbuf and unp_externalize() is never called, first 6(?) kilobytes of data is missing as well on receiving end. This breaks for example tmux. I don't know yet why going from 8 bytes to sizeof(struct filedescent) per descriptor (or even to 16 bytes per descriptor) breaks things, but to work-around it for now use 8 bytes per file descriptor at the cost of memory allocation. Reported by: flo, Diane Bruce, Jan Beich jbe...@tormail.org Simple testcase provided by: mjg Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c == --- head/sys/kern/uipc_usrreq.c Sun Mar 3 23:27:21 2013(r247739) +++ head/sys/kern/uipc_usrreq.c Sun Mar 3 23:39:30 2013(r247740) @@ -102,6 +102,8 @@ __FBSDID($FreeBSD$); #include vm/uma.h +MALLOC_DECLARE(M_FILECAPS); + /* * Locking key: * (l) Locked using list lock @@ -282,7 +284,7 @@ static void unp_drop(struct unpcb *, int static voidunp_gc(__unused void *, int); static voidunp_scan(struct mbuf *, void (*)(struct file *)); static voidunp_discard(struct file *); -static voidunp_freerights(struct filedescent *, int); +static voidunp_freerights(struct filedescent **, int); static voidunp_init(void); static int unp_internalize(struct mbuf **, struct thread *); static voidunp_internalize_fp(struct file *); @@ -1679,17 +1681,17 @@ unp_drop(struct unpcb *unp, int errno) } static void -unp_freerights(struct filedescent *fde, int fdcount) +unp_freerights(struct filedescent **fdep, int fdcount) { struct file *fp; int i; - for (i = 0; i fdcount; i++, fde++) { - fp = fde-fde_file; - filecaps_free(fdep-fde_caps); - bzero(fde, sizeof(*fde)); + for (i = 0; i fdcount; i++) { + fp = fdep[i]-fde_file; + filecaps_free(fdep[i]-fde_caps); unp_discard(fp); } + free(fdep[0], M_FILECAPS); } static int @@ -1700,7 +1702,7 @@ unp_externalize(struct mbuf *control, st int i; int *fdp; struct filedesc *fdesc = td-td_proc-p_fd; - struct filedescent *fde, *fdep; + struct filedescent *fde, **fdep; void *data; socklen_t clen = control-m_len, datalen; int error, newfds; @@ -1756,16 +1758,18 @@ unp_externalize(struct mbuf *control, st fdp = (int *) CMSG_DATA(mtod(*controlp, struct cmsghdr *)); - for (i = 0; i newfds; i++, fdep++, fdp++) { + for (i = 0; i newfds; i++, fdp++) { if (fdalloc(td, 0, f)) panic(unp_externalize fdalloc failed); fde = fdesc-fd_ofiles[f]; - fde-fde_file = fdep-fde_file; - filecaps_move(fdep-fde_caps, fde-fde_caps); + fde-fde_file = fdep[0]-fde_file; + filecaps_move(fdep[0]-fde_caps, + fde-fde_caps); unp_externalize_fp(fde-fde_file); *fdp = f; } FILEDESC_XUNLOCK(fdesc); + free(fdep[0], M_FILECAPS); } else { /* We can just copy anything else across. */ if (error || controlp == NULL) @@ -1840,7 +1844,7 @@ unp_internalize(struct mbuf **controlp, struct bintime *bt; struct cmsghdr *cm = mtod(control, struct cmsghdr *); struct cmsgcred *cmcred; - struct filedescent *fde, *fdep; + struct filedescent *fde, **fdep, *fdev; struct file *fp; struct timeval *tv; int i, fd, *fdp; @@ -1914,7 +1918,7 @@ unp_internalize(struct mbuf **controlp, * Now replace the integer FDs with pointers to the * file structure and capability rights. */ - newlen = oldfds * sizeof(*fdep); + newlen = oldfds * sizeof(fdep[0]); *controlp = sbcreatecontrol(NULL, newlen, SCM_RIGHTS, SOL_SOCKET); if (*controlp == NULL) { @@ -1923,13 +1927,17 @@ unp_internalize(struct mbuf **controlp, goto out;
svn commit: r247751 - head/sbin/devd
Author: eadler Date: Mon Mar 4 02:19:55 2013 New Revision: 247751 URL: http://svnweb.freebsd.org/changeset/base/247751 Log: Constify where possible. Approved by: cperciva (mentor) Modified: head/sbin/devd/devd.cc head/sbin/devd/devd.hh Modified: head/sbin/devd/devd.cc == --- head/sbin/devd/devd.cc Mon Mar 4 01:56:00 2013(r247750) +++ head/sbin/devd/devd.cc Mon Mar 4 02:19:55 2013(r247751) @@ -653,7 +653,7 @@ config::expand_string(const char *src, c } bool -config::chop_var(char *buffer, char *lhs, char *rhs) +config::chop_var(char *buffer, char *lhs, char *rhs) const { char *walker; Modified: head/sbin/devd/devd.hh == --- head/sbin/devd/devd.hh Mon Mar 4 01:56:00 2013(r247750) +++ head/sbin/devd/devd.hh Mon Mar 4 02:19:55 2013(r247751) @@ -172,7 +172,7 @@ protected: void parse_files_in_dir(const char *dirname); void expand_one(const char *src, std::string dst); bool is_id_char(char) const; - bool chop_var(char *buffer, char *lhs, char *rhs); + bool chop_var(char *buffer, char *lhs, char *rhs) const; private: std::vectorstd::string _dir_list; std::string _pidfile; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247752 - head/usr.bin/calendar/calendars
Author: eadler Date: Mon Mar 4 02:21:03 2013 New Revision: 247752 URL: http://svnweb.freebsd.org/changeset/base/247752 Log: Due to calendar(1)'s abuse of the C preprocessor unix gets expanded to 1. 'Fix' this. PR: bin/175790 Submitted by: ak Approved by: cperciva (mentor) Modified: head/usr.bin/calendar/calendars/calendar.birthday Modified: head/usr.bin/calendar/calendars/calendar.birthday == --- head/usr.bin/calendar/calendars/calendar.birthday Mon Mar 4 02:19:55 2013(r247751) +++ head/usr.bin/calendar/calendars/calendar.birthday Mon Mar 4 02:21:03 2013(r247752) @@ -6,6 +6,7 @@ #ifndef _calendar_birthday_ #define _calendar_birthday_ +#undef unix 01/01 J.D. Salinger born, 1919 01/01 Paul Revere born in Boston, 1735 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247753 - head/usr.bin/hexdump
Author: eadler Date: Mon Mar 4 02:21:06 2013 New Revision: 247753 URL: http://svnweb.freebsd.org/changeset/base/247753 Log: Fix typo ('1' != 'l') PR: bin/175975 Submitted by: William Ahern will...@25thandclement.com Approved by: cperciva (mentor) Modified: head/usr.bin/hexdump/conv.c Modified: head/usr.bin/hexdump/conv.c == --- head/usr.bin/hexdump/conv.c Mon Mar 4 02:21:03 2013(r247752) +++ head/usr.bin/hexdump/conv.c Mon Mar 4 02:21:06 2013(r247753) @@ -151,7 +151,7 @@ conv_u(PR *pr, u_char *p) static char const * list[] = { nul, soh, stx, etx, eot, enq, ack, bel, bs, ht, lf, vt, ff, cr, so, si, - dle, dcl, dc2, dc3, dc4, nak, syn, etb, + dle, dc1, dc2, dc3, dc4, nak, syn, etb, can, em, sub, esc, fs, gs, rs, us, }; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247754 - head/sbin/devd
Author: eadler Date: Mon Mar 4 02:21:08 2013 New Revision: 247754 URL: http://svnweb.freebsd.org/changeset/base/247754 Log: devd: Use volatile sig_atomic_t for the flag set by a signal handler. Submitted by: Christoph Mallon christoph.mal...@gmx.de Approved by: cperciva (mentor) Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc == --- head/sbin/devd/devd.cc Mon Mar 4 02:21:06 2013(r247753) +++ head/sbin/devd/devd.cc Mon Mar 4 02:21:08 2013(r247754) @@ -116,7 +116,7 @@ static struct pidfh *pfh; int Dflag; int dflag; int nflag; -int romeo_must_die = 0; +static volatile sig_atomic_t romeo_must_die = 0; static const char *configfile = CF; @@ -1076,7 +1076,7 @@ set_variable(const char *var, const char static void gensighand(int) { - romeo_must_die++; + romeo_must_die = 1; _exit(0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247755 - head/sbin/devd
Author: eadler Date: Mon Mar 4 02:21:12 2013 New Revision: 247755 URL: http://svnweb.freebsd.org/changeset/base/247755 Log: devd: Remove call to _exit() from signal handler, which also sets a stop flag. Submitted by: Christoph Mallon christoph.mal...@gmx.de Approved by: cperciva (mentor) Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc == --- head/sbin/devd/devd.cc Mon Mar 4 02:21:08 2013(r247754) +++ head/sbin/devd/devd.cc Mon Mar 4 02:21:12 2013(r247755) @@ -1077,7 +1077,6 @@ static void gensighand(int) { romeo_must_die = 1; - _exit(0); } static void ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247756 - head/sbin/devd
Author: eadler Date: Mon Mar 4 02:21:15 2013 New Revision: 247756 URL: http://svnweb.freebsd.org/changeset/base/247756 Log: devd: Simplify while (1) { if (x) break; } to while (!x) {}. Submitted by: Christoph Mallon christoph.mal...@gmx.de Approved by: cperciva (mentor) Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc == --- head/sbin/devd/devd.cc Mon Mar 4 02:21:12 2013(r247755) +++ head/sbin/devd/devd.cc Mon Mar 4 02:21:15 2013(r247756) @@ -912,9 +912,7 @@ event_loop(void) server_fd = create_socket(PIPE); accepting = 1; max_fd = max(fd, server_fd) + 1; - while (1) { - if (romeo_must_die) - break; + while (!romeo_must_die) { if (!once !dflag !nflag) { // Check to see if we have any events pending. tv.tv_sec = 0; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247757 - head/sbin/devd
Author: eadler Date: Mon Mar 4 02:21:17 2013 New Revision: 247757 URL: http://svnweb.freebsd.org/changeset/base/247757 Log: devd: Use the standard constructor of std::string instead of string(). Submitted by: Christoph Mallon christoph.mal...@gmx.de Approved by: cperciva (mentor) Modified: head/sbin/devd/devd.hh Modified: head/sbin/devd/devd.hh == --- head/sbin/devd/devd.hh Mon Mar 4 02:21:15 2013(r247756) +++ head/sbin/devd/devd.hh Mon Mar 4 02:21:17 2013(r247757) @@ -144,7 +144,7 @@ private: class config { public: - config() : _pidfile() { push_var_table(); } + config() { push_var_table(); } virtual ~config() { reset(); } void add_attach(int, event_proc *); void add_detach(int, event_proc *); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247758 - head/sbin/devd
Author: eadler Date: Mon Mar 4 02:21:19 2013 New Revision: 247758 URL: http://svnweb.freebsd.org/changeset/base/247758 Log: devd: Avoid unnecessary temporary objects (and simplify the code) when handling std::string. Submitted by: Christoph Mallon christoph.mal...@gmx.de Approved by: cperciva (mentor) Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc == --- head/sbin/devd/devd.cc Mon Mar 4 02:21:17 2013(r247757) +++ head/sbin/devd/devd.cc Mon Mar 4 02:21:19 2013(r247758) @@ -460,7 +460,7 @@ config::open_pidfile() { pid_t otherpid; - if (_pidfile == ) + if (_pidfile.empty()) return; pfh = pidfile_open(_pidfile.c_str(), 0600, otherpid); if (pfh == NULL) { @@ -528,7 +528,7 @@ config::add_notify(int prio, event_proc void config::set_pidfile(const char *fn) { - _pidfile = string(fn); + _pidfile = fn; } void @@ -617,7 +617,7 @@ config::expand_one(const char *src, str do { buffer.append(src++, 1); } while (is_id_char(*src)); - dst.append(get_variable(buffer.c_str())); + dst.append(get_variable(buffer)); } const string ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247759 - head/sbin/devd
Author: eadler Date: Mon Mar 4 02:21:22 2013 New Revision: 247759 URL: http://svnweb.freebsd.org/changeset/base/247759 Log: devd: Remove empty virtual destructor from class, which has noch subclasses. Submitted by: Christoph Mallon christoph.mal...@gmx.de Approved by: cperciva (mentor) Modified: head/sbin/devd/devd.hh Modified: head/sbin/devd/devd.hh == --- head/sbin/devd/devd.hh Mon Mar 4 02:21:19 2013(r247758) +++ head/sbin/devd/devd.hh Mon Mar 4 02:21:22 2013(r247759) @@ -42,7 +42,6 @@ class var_list { public: var_list() {} - virtual ~var_list() {} /** Set a variable in this var list. */ void set_variable(const std::string var, const std::string val); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247760 - head/sbin/devd
Author: eadler Date: Mon Mar 4 02:21:24 2013 New Revision: 247760 URL: http://svnweb.freebsd.org/changeset/base/247760 Log: devd: Remove unnecessary empty default constructors. Submitted by: Christoph Mallon christoph.mal...@gmx.de Approved by: cperciva (mentor) Modified: head/sbin/devd/devd.hh Modified: head/sbin/devd/devd.hh == --- head/sbin/devd/devd.hh Mon Mar 4 02:21:22 2013(r247759) +++ head/sbin/devd/devd.hh Mon Mar 4 02:21:24 2013(r247760) @@ -41,7 +41,6 @@ class config; class var_list { public: - var_list() {} /** Set a variable in this var list. */ void set_variable(const std::string var, const std::string val); @@ -67,7 +66,6 @@ private: struct eps { public: - eps() {} virtual ~eps() {} /** Does this eps match the current config? */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247761 - head/sbin/devd
Author: eadler Date: Mon Mar 4 02:21:26 2013 New Revision: 247761 URL: http://svnweb.freebsd.org/changeset/base/247761 Log: devd: Use string::empty() instea of string::length() == 0. Submitted by: Christoph Mallon christoph.mal...@gmx.de Approved by: cperciva (mentor) Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc == --- head/sbin/devd/devd.cc Mon Mar 4 02:21:24 2013(r247760) +++ head/sbin/devd/devd.cc Mon Mar 4 02:21:26 2013(r247761) @@ -319,7 +319,7 @@ media::do_match(config c) // the name of interest, first try device-name and fall back // to subsystem if none exists. value = c.get_variable(device-name); - if (value.length() == 0) + if (value.empty()) value = c.get_variable(subsystem); if (Dflag) fprintf(stderr, Testing media type of %s against 0x%x\n, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247762 - head/sbin/devd
Author: eadler Date: Mon Mar 4 02:21:29 2013 New Revision: 247762 URL: http://svnweb.freebsd.org/changeset/base/247762 Log: devd: Use simpler dst += *x instead of str.append(x, 1). Submitted by: Christoph Mallon christoph.mal...@gmx.de Approved by: cperciva (mentor) Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc == --- head/sbin/devd/devd.cc Mon Mar 4 02:21:26 2013(r247761) +++ head/sbin/devd/devd.cc Mon Mar 4 02:21:29 2013(r247762) @@ -585,7 +585,7 @@ config::expand_one(const char *src, str src++; // $$ - $ if (*src == '$') { - dst.append(src++, 1); + dst += *src++; return; } @@ -593,7 +593,7 @@ config::expand_one(const char *src, str // Not sure if I want to support this or not, so for now we just pass // it through. if (*src == '(') { - dst.append($); + dst += '$'; count = 1; /* If the string ends before ) is matched , return. */ while (count 0 *src) { @@ -601,21 +601,21 @@ config::expand_one(const char *src, str count--; else if (*src == '(') count++; - dst.append(src++, 1); + dst += *src++; } return; } // ${^A-Za-z] - $\1 if (!isalpha(*src)) { - dst.append($); - dst.append(src++, 1); + dst += '$'; + dst += *src++; return; } // $var - replace with value do { - buffer.append(src++, 1); + buffer += *src++; } while (is_id_char(*src)); dst.append(get_variable(buffer)); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247763 - head/sbin/devd
Author: eadler Date: Mon Mar 4 02:21:31 2013 New Revision: 247763 URL: http://svnweb.freebsd.org/changeset/base/247763 Log: devd: Correct typo in comment. Submitted by: Christoph Mallon christoph.mal...@gmx.de Approved by: cperciva (mentor) Modified: head/sbin/devd/devd.cc Modified: head/sbin/devd/devd.cc == --- head/sbin/devd/devd.cc Mon Mar 4 02:21:29 2013(r247762) +++ head/sbin/devd/devd.cc Mon Mar 4 02:21:31 2013(r247763) @@ -606,7 +606,7 @@ config::expand_one(const char *src, str return; } - // ${^A-Za-z] - $\1 + // $[^A-Za-z] - $\1 if (!isalpha(*src)) { dst += '$'; dst += *src++; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247764 - in head/sys/compat: linprocfs linux
Author: eadler Date: Mon Mar 4 02:21:34 2013 New Revision: 247764 URL: http://svnweb.freebsd.org/changeset/base/247764 Log: Remove check for NULL prior to free(9) and m_freem(9). Approved by: cperciva (mentor) Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/compat/linux/linux_file.c head/sys/compat/linux/linux_socket.c Modified: head/sys/compat/linprocfs/linprocfs.c == --- head/sys/compat/linprocfs/linprocfs.c Mon Mar 4 02:21:31 2013 (r247763) +++ head/sys/compat/linprocfs/linprocfs.c Mon Mar 4 02:21:34 2013 (r247764) @@ -386,8 +386,7 @@ linprocfs_domtab(PFS_FILL_ARGS) sbuf_printf(sb, 0 0\n); } mtx_unlock(mountlist_mtx); - if (flep != NULL) - free(flep, M_TEMP); + free(flep, M_TEMP); return (error); } @@ -447,8 +446,7 @@ linprocfs_dopartitions(PFS_FILL_ARGS) } g_topology_unlock(); - if (flep != NULL) - free(flep, M_TEMP); + free(flep, M_TEMP); return (error); } Modified: head/sys/compat/linux/linux_file.c == --- head/sys/compat/linux/linux_file.c Mon Mar 4 02:21:31 2013 (r247763) +++ head/sys/compat/linux/linux_file.c Mon Mar 4 02:21:34 2013 (r247764) @@ -517,8 +517,7 @@ eof: td-td_retval[0] = nbytes - resid; out: - if (cookies) - free(cookies, M_TEMP); + free(cookies, M_TEMP); VOP_UNLOCK(vp, 0); foffset_unlock(fp, off, 0); Modified: head/sys/compat/linux/linux_socket.c == --- head/sys/compat/linux/linux_socket.cMon Mar 4 02:21:31 2013 (r247763) +++ head/sys/compat/linux/linux_socket.cMon Mar 4 02:21:34 2013 (r247764) @@ -1443,10 +1443,8 @@ out: bad: free(iov, M_IOV); - if (control != NULL) - m_freem(control); - if (linux_cmsg != NULL) - free(linux_cmsg, M_TEMP); + m_freem(control); + free(linux_cmsg, M_TEMP); return (error); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r247774 - in head/sys/dev/ath: . ath_hal ath_hal/ar5416
Author: adrian Date: Mon Mar 4 07:40:49 2013 New Revision: 247774 URL: http://svnweb.freebsd.org/changeset/base/247774 Log: add a method to set/clear the VMF field in the TX descriptor. Obtained from:Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_hal/ah.h == --- head/sys/dev/ath/ath_hal/ah.h Mon Mar 4 07:25:11 2013 (r247773) +++ head/sys/dev/ath/ath_hal/ah.h Mon Mar 4 07:40:49 2013 (r247774) @@ -1527,11 +1527,13 @@ struct ath_hal { struct ath_desc *, u_int); void __ahdecl(*ah_set11nAggrLast)(struct ath_hal *, struct ath_desc *); - void __ahdecl(*ah_clr11nAggr)(struct ath_hal *, struct ath_desc *); void __ahdecl(*ah_set11nBurstDuration)(struct ath_hal *, struct ath_desc *, u_int); + void __ahdecl(*ah_set11nVirtMoreFrag)(struct ath_hal *, + struct ath_desc *, u_int); + HAL_BOOL __ahdecl(*ah_getMibCycleCounts) (struct ath_hal *, HAL_SURVEY_SAMPLE *); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h == --- head/sys/dev/ath/ath_hal/ar5416/ar5416.hMon Mar 4 07:25:11 2013 (r247773) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.hMon Mar 4 07:40:49 2013 (r247774) @@ -409,8 +409,9 @@ extern void ar5416Set11nAggrFirst(struct u_int aggrLen, u_int numDelims); extern void ar5416Set11nAggrMiddle(struct ath_hal *ah, struct ath_desc *ds, u_int numDelims); extern void ar5416Set11nAggrLast(struct ath_hal *ah, struct ath_desc *ds); - extern void ar5416Clr11nAggr(struct ath_hal *ah, struct ath_desc *ds); +extern void ar5416Set11nVirtualMoreFrag(struct ath_hal *ah, + struct ath_desc *ds, u_int vmf); extern void ar5416Set11nBurstDuration(struct ath_hal *ah, struct ath_desc *ds, u_int burstDuration); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Mon Mar 4 07:25:11 2013(r247773) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Mon Mar 4 07:40:49 2013(r247774) @@ -194,6 +194,7 @@ ar5416InitState(struct ath_hal_5416 *ahp ah-ah_set11nMac2040= ar5416Set11nMac2040; ah-ah_get11nRxClear= ar5416Get11nRxClear; ah-ah_set11nRxClear= ar5416Set11nRxClear; + ah-ah_set11nVirtMoreFrag = ar5416Set11nVirtualMoreFrag; /* Interrupt functions */ ah-ah_isInterruptPending = ar5416IsInterruptPending; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c == --- head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Mon Mar 4 07:25:11 2013(r247773) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Mon Mar 4 07:40:49 2013(r247774) @@ -825,6 +825,17 @@ ar5416Clr11nAggr(struct ath_hal *ah, str ads-ds_ctl6 = ~AR_AggrLen; } +void +ar5416Set11nVirtualMoreFrag(struct ath_hal *ah, struct ath_desc *ds, +u_int vmf) +{ + struct ar5416_desc *ads = AR5416DESC(ds); + if (vmf) + ads-ds_ctl0 |= AR_VirtMoreFrag; + else + ads-ds_ctl0 = ~AR_VirtMoreFrag; +} + /* * Program the burst duration, with the included BA delta if it's * applicable. Modified: head/sys/dev/ath/if_athvar.h == --- head/sys/dev/ath/if_athvar.hMon Mar 4 07:25:11 2013 (r247773) +++ head/sys/dev/ath/if_athvar.hMon Mar 4 07:40:49 2013 (r247774) @@ -1297,6 +1297,8 @@ void ath_intr(void *); ((*(_ah)-ah_set11nBurstDuration)((_ah), (_ds), (_dur))) #defineath_hal_clr11n_aggr(_ah, _ds) \ ((*(_ah)-ah_clr11nAggr)((_ah), (_ds))) +#defineath_hal_set11n_virtmorefrag(_ah, _ds, _v) \ + ((*(_ah)-ah_set11nVirtMoreFrag)((_ah), (_ds), (_v))) #defineath_hal_gpioCfgOutput(_ah, _gpio, _type) \ ((*(_ah)-ah_gpioCfgOutput)((_ah), (_gpio), (_type))) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org