Date: Sun, 1 Feb 2009 01:04:31 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r187971 - in user/thompsa/usb: . bin/dd contrib/opie contrib/wpa_supplicant etc etc/rc.d gnu/usr.bin/grep include lib/libc/db/man libexec/ftpd sbin/fsck sbin/fsck_ffs sbin/ifconfig sbin... Message-ID: <200902010104.n1114V07038779@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: thompsa Date: Sun Feb 1 01:04:31 2009 New Revision: 187971 URL: http://svn.freebsd.org/changeset/base/187971 Log: MFH r187836-187970 Added: user/thompsa/usb/usr.sbin/bluetooth/btpand/ - copied from r187970, head/usr.sbin/bluetooth/btpand/ Deleted: user/thompsa/usb/share/man/man8/adding_user.8 Modified: user/thompsa/usb/ (props changed) user/thompsa/usb/bin/dd/dd.1 user/thompsa/usb/contrib/opie/opiekey.1 user/thompsa/usb/contrib/wpa_supplicant/ (props changed) user/thompsa/usb/etc/rc.d/defaultroute user/thompsa/usb/etc/rc.d/ntpd user/thompsa/usb/etc/regdomain.xml user/thompsa/usb/gnu/usr.bin/grep/savedir.c user/thompsa/usb/include/paths.h user/thompsa/usb/include/stdlib.h user/thompsa/usb/include/string.h user/thompsa/usb/include/wchar.h user/thompsa/usb/lib/libc/db/man/dbm.3 user/thompsa/usb/libexec/ftpd/ftpd.8 user/thompsa/usb/sbin/fsck/fsck.8 user/thompsa/usb/sbin/fsck/fsck.c user/thompsa/usb/sbin/fsck/fsutil.h user/thompsa/usb/sbin/fsck_ffs/fsck.h user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8 user/thompsa/usb/sbin/fsck_ffs/main.c user/thompsa/usb/sbin/fsck_ffs/setup.c user/thompsa/usb/sbin/ifconfig/ifieee80211.c user/thompsa/usb/sbin/reboot/reboot.c user/thompsa/usb/share/man/man4/ng_bpf.4 user/thompsa/usb/share/man/man5/rc.conf.5 user/thompsa/usb/share/man/man7/Makefile user/thompsa/usb/share/man/man8/Makefile user/thompsa/usb/share/misc/committers-src.dot user/thompsa/usb/sys/ (props changed) user/thompsa/usb/sys/amd64/amd64/cpu_switch.S user/thompsa/usb/sys/amd64/amd64/fpu.c user/thompsa/usb/sys/amd64/amd64/io_apic.c user/thompsa/usb/sys/amd64/amd64/local_apic.c user/thompsa/usb/sys/amd64/amd64/mp_machdep.c user/thompsa/usb/sys/amd64/amd64/msi.c user/thompsa/usb/sys/amd64/ia32/ia32_signal.c user/thompsa/usb/sys/amd64/ia32/ia32_sigtramp.S user/thompsa/usb/sys/amd64/include/apicvar.h user/thompsa/usb/sys/amd64/include/cpufunc.h user/thompsa/usb/sys/amd64/include/fpu.h user/thompsa/usb/sys/amd64/include/intr_machdep.h user/thompsa/usb/sys/amd64/linux32/linux32_locore.s user/thompsa/usb/sys/amd64/linux32/linux32_sysvec.c user/thompsa/usb/sys/arm/arm/busdma_machdep.c user/thompsa/usb/sys/arm/arm/cpufunc_asm_sheeva.S (props changed) user/thompsa/usb/sys/boot/i386/pxeldr/pxeboot.8 user/thompsa/usb/sys/cam/scsi/scsi_pass.c user/thompsa/usb/sys/compat/ndis/winx32_wrap.S user/thompsa/usb/sys/contrib/pf/ (props changed) user/thompsa/usb/sys/dev/adb/adb_mouse.c user/thompsa/usb/sys/dev/mmc/mmc.c user/thompsa/usb/sys/dev/sdhci/sdhci.c user/thompsa/usb/sys/dev/sound/pci/hda/hdac.c user/thompsa/usb/sys/dev/usb/ehci_ixp4xx.c (props changed) user/thompsa/usb/sys/dev/usb2/bluetooth/ng_ubt2.c user/thompsa/usb/sys/dev/usb2/bluetooth/ubtbcmfw2.c user/thompsa/usb/sys/fs/cd9660/cd9660_lookup.c user/thompsa/usb/sys/fs/cd9660/cd9660_node.c user/thompsa/usb/sys/fs/cd9660/cd9660_node.h user/thompsa/usb/sys/fs/cd9660/cd9660_vfsops.c user/thompsa/usb/sys/fs/cd9660/cd9660_vnops.c user/thompsa/usb/sys/fs/coda/coda_vfsops.c user/thompsa/usb/sys/fs/devfs/devfs_devs.c user/thompsa/usb/sys/fs/devfs/devfs_vnops.c user/thompsa/usb/sys/fs/hpfs/hpfs_vfsops.c user/thompsa/usb/sys/fs/nullfs/null_vnops.c user/thompsa/usb/sys/fs/nwfs/nwfs_subr.c user/thompsa/usb/sys/fs/nwfs/nwfs_vnops.c user/thompsa/usb/sys/fs/smbfs/smbfs_vnops.c user/thompsa/usb/sys/fs/tmpfs/tmpfs_subr.c user/thompsa/usb/sys/fs/udf/udf_vnops.c user/thompsa/usb/sys/i386/i386/io_apic.c user/thompsa/usb/sys/i386/i386/local_apic.c user/thompsa/usb/sys/i386/i386/locore.s user/thompsa/usb/sys/i386/i386/mp_machdep.c user/thompsa/usb/sys/i386/i386/msi.c user/thompsa/usb/sys/i386/i386/swtch.s user/thompsa/usb/sys/i386/include/apicvar.h user/thompsa/usb/sys/i386/include/cpufunc.h user/thompsa/usb/sys/i386/include/intr_machdep.h user/thompsa/usb/sys/i386/linux/linux_locore.s user/thompsa/usb/sys/i386/svr4/svr4_locore.s user/thompsa/usb/sys/i386/xen/mp_machdep.c user/thompsa/usb/sys/kern/kern_jail.c user/thompsa/usb/sys/kern/kern_mib.c user/thompsa/usb/sys/kern/kern_sysctl.c user/thompsa/usb/sys/kern/tty_info.c user/thompsa/usb/sys/kern/vfs_cache.c user/thompsa/usb/sys/mips/mips/elf64_machdep.c (props changed) user/thompsa/usb/sys/modules/usb2/controller_atmegadci/ (props changed) user/thompsa/usb/sys/net/if_llatbl.c user/thompsa/usb/sys/net80211/ieee80211.c user/thompsa/usb/sys/net80211/ieee80211_node.c user/thompsa/usb/sys/net80211/ieee80211_tdma.c user/thompsa/usb/sys/netinet6/frag6.c user/thompsa/usb/sys/netinet6/in6.c user/thompsa/usb/sys/netinet6/in6_gif.c user/thompsa/usb/sys/netinet6/in6_ifattach.c user/thompsa/usb/sys/netinet6/ip6_forward.c user/thompsa/usb/sys/netinet6/ip6_input.c user/thompsa/usb/sys/netinet6/ip6_var.h user/thompsa/usb/sys/netinet6/nd6.c user/thompsa/usb/sys/netinet6/nd6_nbr.c user/thompsa/usb/sys/netinet6/nd6_rtr.c user/thompsa/usb/sys/netinet6/vinet6.h user/thompsa/usb/sys/netipsec/ipsec_output.c user/thompsa/usb/sys/sys/_null.h user/thompsa/usb/sys/sys/cdefs.h user/thompsa/usb/sys/sys/malloc.h user/thompsa/usb/sys/sys/unistd.h user/thompsa/usb/sys/ufs/ffs/ffs_vfsops.c user/thompsa/usb/tools/regression/lib/libc/stdio/test-printfloat.c user/thompsa/usb/tools/regression/lib/msun/Makefile user/thompsa/usb/tools/tools/ath/athrd/athrd.1 user/thompsa/usb/tools/tools/ath/athrd/athrd.c user/thompsa/usb/tools/tools/ath/athstats/Makefile user/thompsa/usb/usr.bin/sockstat/sockstat.c user/thompsa/usb/usr.sbin/crunch/crunchgen/crunchgen.c user/thompsa/usb/usr.sbin/gssd/gssd.8 user/thompsa/usb/usr.sbin/makefs/ffs/ffs_bswap.c (props changed) user/thompsa/usb/usr.sbin/makefs/ffs/ffs_subr.c (props changed) user/thompsa/usb/usr.sbin/makefs/ffs/ufs_bswap.h (props changed) user/thompsa/usb/usr.sbin/makefs/getid.c (props changed) user/thompsa/usb/usr.sbin/mtree/create.c user/thompsa/usb/usr.sbin/mtree/mtree.5 user/thompsa/usb/usr.sbin/mtree/mtree.8 user/thompsa/usb/usr.sbin/mtree/spec.c Modified: user/thompsa/usb/bin/dd/dd.1 ============================================================================== --- user/thompsa/usb/bin/dd/dd.1 Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/bin/dd/dd.1 Sun Feb 1 01:04:31 2009 (r187971) @@ -32,7 +32,7 @@ .\" @(#)dd.1 8.2 (Berkeley) 1/13/94 .\" $FreeBSD$ .\" -.Dd August 15, 2004 +.Dd January 23, 2009 .Dt DD 1 .Os .Sh NAME Modified: user/thompsa/usb/contrib/opie/opiekey.1 ============================================================================== --- user/thompsa/usb/contrib/opie/opiekey.1 Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/contrib/opie/opiekey.1 Sun Feb 1 01:04:31 2009 (r187971) @@ -157,8 +157,7 @@ this mistake. Better checks are needed. .BR opieinfo (1), .BR opiekeys (5), .BR opieaccess (5), -.BR opiegen (1) -.BR su (1), +.BR su (1) .SH AUTHOR Bellcore's S/Key was written by Phil Karn, Neil M. Haller, and John S. Walden Modified: user/thompsa/usb/etc/rc.d/defaultroute ============================================================================== --- user/thompsa/usb/etc/rc.d/defaultroute Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/etc/rc.d/defaultroute Sun Feb 1 01:04:31 2009 (r187971) @@ -21,7 +21,6 @@ defaultroute_start() # Return without waiting if we don't have dhcp interfaces. # Once we can test that the link is actually up, we should # remove this test and always wait. - dhcp_interfaces=`list_net_interfaces dhcp` [ -z "`list_net_interfaces dhcp`" ] && return # Wait for a default route Modified: user/thompsa/usb/etc/rc.d/ntpd ============================================================================== --- user/thompsa/usb/etc/rc.d/ntpd Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/etc/rc.d/ntpd Sun Feb 1 01:04:31 2009 (r187971) @@ -23,7 +23,7 @@ ntpd_precmd() rc_flags="-c ${ntpd_config} ${ntpd_flags}" if checkyesno ntpd_sync_on_start; then - rc_flags="-q -g $rc_flags" + rc_flags="-g $rc_flags" fi if [ -z "$ntpd_chrootdir" ]; then Modified: user/thompsa/usb/etc/regdomain.xml ============================================================================== --- user/thompsa/usb/etc/regdomain.xml Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/etc/regdomain.xml Sun Feb 1 01:04:31 2009 (r187971) @@ -1133,7 +1133,6 @@ <rd id="sr9"> <name>SR9</name> <sku>0x0298</sku> - <defcc ref="SR9"/> <netband mode="11g"> <band> <freqband ref="S1_907_922_5"/> @@ -1156,20 +1155,19 @@ <rd id="xr9"> <name>XR9</name> <sku>0x299</sku> - <defcc ref="XR9"/> <netband mode="11g"> <band> - <freqband ref="S2_907_922_5"/> + <freqband ref="S1_907_922_5"/> <maxpower>30</maxpower> <flags>IEEE80211_CHAN_G</flags> </band> <band> - <freqband ref="S2_907_922_10"/> + <freqband ref="S1_907_922_10"/> <maxpower>30</maxpower> <flags>IEEE80211_CHAN_G</flags> </band> <band> - <freqband ref="S2_912_917"/> + <freqband ref="S1_912_917"/> <maxpower>30</maxpower> <flags>IEEE80211_CHAN_G</flags> </band> @@ -1179,7 +1177,6 @@ <rd id="gz901"> <name>GZ901</name> <sku>0x29a</sku> - <defcc ref="GZ901"/> <netband mode="11g"> <band> <freqband ref="S1_908_923_5"/> @@ -1319,9 +1316,6 @@ <country id="GT"> <isocc>320</isocc> <name>Guatemala</name> <rd ref="none"/> </country> -<country id="GZ901"> - <isocc>5002</isocc> <name>ZComax GZ-901</name> <rd ref="gz901"/> -</country> <country id="HN"> <isocc>340</isocc> <name>Honduras</name> <rd ref="none"/> </country> @@ -1517,12 +1511,6 @@ <country id="TR"> <isocc>792</isocc> <name>Turkey</name> <rd ref="etsi"/> </country> -<country id="SR9"> - <isocc>5000</isocc> <name>Ubiquiti SR9</name> <rd ref="sr9"/> -</country> -<country id="XR9"> - <isocc>5001</isocc> <name>Ubiquiti XR9</name> <rd ref="xr9"/> -</country> <country id="UA"> <isocc>804</isocc> <name>Ukraine</name> <rd ref="none"/> </country> @@ -1725,55 +1713,37 @@ </freqband> <freqband id="S1_907_922_5"> - <freqstart>2422</freqstart> <freqend>2437</freqend> + <freqstart>907</freqstart> <freqend>922</freqend> <chanwidth>5</chanwidth> <chansep>5</chansep> <flags>IEEE80211_CHAN_GSM</flags> <flags>IEEE80211_CHAN_QUARTER</flags> </freqband> <freqband id="S1_907_922_10"> - <freqstart>2422</freqstart> <freqend>2437</freqend> + <freqstart>907</freqstart> <freqend>922</freqend> <chanwidth>10</chanwidth> <chansep>5</chansep> <flags>IEEE80211_CHAN_GSM</flags> <flags>IEEE80211_CHAN_HALF</flags> </freqband> <freqband id="S1_912_917"> - <freqstart>2427</freqstart> <freqend>2432</freqend> - <chanwidth>20</chanwidth> <chansep>5</chansep> - <flags>IEEE80211_CHAN_GSM</flags> -</freqband> - -<freqband id="S2_907_922_5"> - <freqstart>2427</freqstart> <freqend>2442</freqend> - <chanwidth>5</chanwidth> <chansep>5</chansep> - <flags>IEEE80211_CHAN_GSM</flags> - <flags>IEEE80211_CHAN_QUARTER</flags> -</freqband> -<freqband id="S2_907_922_10"> - <freqstart>2427</freqstart> <freqend>2442</freqend> - <chanwidth>10</chanwidth> <chansep>5</chansep> - <flags>IEEE80211_CHAN_GSM</flags> - <flags>IEEE80211_CHAN_HALF</flags> -</freqband> -<freqband id="S2_912_917"> - <freqstart>2432</freqstart> <freqend>2437</freqend> + <freqstart>912</freqstart> <freqend>917</freqend> <chanwidth>20</chanwidth> <chansep>5</chansep> <flags>IEEE80211_CHAN_GSM</flags> </freqband> <freqband id="S1_908_923_5"> - <freqstart>2447</freqstart> <freqend>2467</freqend> + <freqstart>908</freqstart> <freqend>923</freqend> <chanwidth>5</chanwidth> <chansep>5</chansep> <flags>IEEE80211_CHAN_GSM</flags> <flags>IEEE80211_CHAN_QUARTER</flags> </freqband> <freqband id="S1_913_918_10"> - <freqstart>2457</freqstart> <freqend>2462</freqend> + <freqstart>913</freqstart> <freqend>918</freqend> <chanwidth>10</chanwidth> <chansep>5</chansep> <flags>IEEE80211_CHAN_GSM</flags> <flags>IEEE80211_CHAN_HALF</flags> </freqband> <freqband id="S1_913_918"> - <freqstart>2457</freqstart> <freqend>2462</freqend> + <freqstart>913</freqstart> <freqend>918</freqend> <chanwidth>20</chanwidth> <chansep>5</chansep> <flags>IEEE80211_CHAN_GSM</flags> </freqband> Modified: user/thompsa/usb/gnu/usr.bin/grep/savedir.c ============================================================================== --- user/thompsa/usb/gnu/usr.bin/grep/savedir.c Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/gnu/usr.bin/grep/savedir.c Sun Feb 1 01:04:31 2009 (r187971) @@ -17,6 +17,9 @@ /* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + #if HAVE_CONFIG_H # include <config.h> #endif @@ -137,10 +140,10 @@ savedir (const char *dir, off_t name_siz && !isdir1 (dir, dp->d_name)) { if (included_patterns - && !excluded_filename (included_patterns, dp->d_name, 0)) + && !excluded_filename (included_patterns, path, 0)) continue; if (excluded_patterns - && excluded_filename (excluded_patterns, dp->d_name, 0)) + && excluded_filename (excluded_patterns, path, 0)) continue; } Modified: user/thompsa/usb/include/paths.h ============================================================================== --- user/thompsa/usb/include/paths.h Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/include/paths.h Sun Feb 1 01:04:31 2009 (r187971) @@ -42,10 +42,9 @@ /* Default search path. */ #define _PATH_DEFPATH "/usr/bin:/bin" /* All standard utilities path. */ -#define _PATH_STDPATH \ - "/usr/bin:/bin:/usr/sbin:/sbin:" -/* Locate system binaries */ -#define _PATH_SYSPATH "/sbin:/usr/sbin" +#define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin:" +/* Locate system binaries. */ +#define _PATH_SYSPATH "/sbin:/usr/sbin" #define _PATH_AUTHCONF "/etc/auth.conf" #define _PATH_BSHELL "/bin/sh" Modified: user/thompsa/usb/include/stdlib.h ============================================================================== --- user/thompsa/usb/include/stdlib.h Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/include/stdlib.h Sun Feb 1 01:04:31 2009 (r187971) @@ -88,14 +88,14 @@ int atoi(const char *); long atol(const char *); void *bsearch(const void *, const void *, size_t, size_t, int (*)(const void *, const void *)); -void *calloc(size_t, size_t); +void *calloc(size_t, size_t) __malloc_like; div_t div(int, int) __pure2; void exit(int) __dead2; void free(void *); char *getenv(const char *); long labs(long) __pure2; ldiv_t ldiv(long, long) __pure2; -void *malloc(size_t); +void *malloc(size_t) __malloc_like; int mblen(const char *, size_t); size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); Modified: user/thompsa/usb/include/string.h ============================================================================== --- user/thompsa/usb/include/string.h Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/include/string.h Sun Feb 1 01:04:31 2009 (r187971) @@ -78,7 +78,7 @@ int strcoll(const char *, const char *) char *strcpy(char * __restrict, const char * __restrict); size_t strcspn(const char *, const char *) __pure; #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE -char *strdup(const char *); +char *strdup(const char *) __malloc_like; #endif char *strerror(int); #if __POSIX_VISIBLE >= 200112 @@ -96,7 +96,7 @@ char *strncat(char * __restrict, const c int strncmp(const char *, const char *, size_t) __pure; char *strncpy(char * __restrict, const char * __restrict, size_t); #if __BSD_VISIBLE -char *strndup(const char *, size_t); +char *strndup(const char *, size_t) __malloc_like; char *strnstr(const char *, const char *, size_t) __pure; #endif char *strpbrk(const char *, const char *) __pure; Modified: user/thompsa/usb/include/wchar.h ============================================================================== --- user/thompsa/usb/include/wchar.h Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/include/wchar.h Sun Feb 1 01:04:31 2009 (r187971) @@ -214,7 +214,7 @@ int wcwidth(wchar_t); wchar_t *fgetwln(struct __sFILE * __restrict, size_t * __restrict); size_t mbsnrtowcs(wchar_t * __restrict, const char ** __restrict, size_t, size_t, mbstate_t * __restrict); -wchar_t *wcsdup(const wchar_t *); +wchar_t *wcsdup(const wchar_t *) __malloc_like; size_t wcsnrtombs(char * __restrict, const wchar_t ** __restrict, size_t, size_t, mbstate_t * __restrict); size_t wcslcat(wchar_t *, const wchar_t *, size_t); Modified: user/thompsa/usb/lib/libc/db/man/dbm.3 ============================================================================== --- user/thompsa/usb/lib/libc/db/man/dbm.3 Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/lib/libc/db/man/dbm.3 Sun Feb 1 01:04:31 2009 (r187971) @@ -15,8 +15,6 @@ .\" .\" $FreeBSD$ .\" -.\" Note: The date here should be updated whenever a non-trivial -.\" change is made to the manual page. .Dd April 16, 2006 .Dt DBM 3 .Os Modified: user/thompsa/usb/libexec/ftpd/ftpd.8 ============================================================================== --- user/thompsa/usb/libexec/ftpd/ftpd.8 Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/libexec/ftpd/ftpd.8 Sun Feb 1 01:04:31 2009 (r187971) @@ -205,7 +205,7 @@ for more information. Note that option is a virtual no-op in .Fx 5.0 and above; both port -ranges are indentical by default. +ranges are identical by default. .It Fl u The default file creation mode mask is set to .Ar umask , Modified: user/thompsa/usb/sbin/fsck/fsck.8 ============================================================================== --- user/thompsa/usb/sbin/fsck/fsck.8 Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/sbin/fsck/fsck.8 Sun Feb 1 01:04:31 2009 (r187971) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 25, 2001 +.Dd January 25, 2009 .Dt FSCK 8 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd file system consistency check and interactive repair .Sh SYNOPSIS .Nm -.Op Fl dfnpvy +.Op Fl Cdfnpvy .Op Fl B | F .Op Fl T Ar fstype : Ns Ar fsoptions .Op Fl t Ar fstype @@ -112,6 +112,11 @@ to be the partition and slice designator .Pp The options are as follows: .Bl -tag -width indent +.It Fl C +Check if the +.Dq clean +flag is set in the superblock and skip file system checks if file system was +properly dismounted and marked clean. .It Fl d Debugging mode. Just print the commands without executing them. Modified: user/thompsa/usb/sbin/fsck/fsck.c ============================================================================== --- user/thompsa/usb/sbin/fsck/fsck.c Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/sbin/fsck/fsck.c Sun Feb 1 01:04:31 2009 (r187971) @@ -103,7 +103,7 @@ main(int argc, char *argv[]) TAILQ_INIT(&selhead); TAILQ_INIT(&opthead); - while ((i = getopt(argc, argv, "BdvpfFnyl:t:T:")) != -1) + while ((i = getopt(argc, argv, "BCdvpfFnyl:t:T:")) != -1) switch (i) { case 'B': if (flags & CHECK_BACKGRD) @@ -128,6 +128,9 @@ main(int argc, char *argv[]) case 'p': flags |= CHECK_PREEN; /*FALLTHROUGH*/ + case 'C': + flags |= CHECK_CLEAN; + /*FALLTHROUGH*/ case 'n': case 'y': globopt[1] = i; @@ -566,7 +569,7 @@ static void usage(void) { static const char common[] = - "[-dfnpvy] [-B | -F] [-T fstype:fsoptions] [-t fstype]"; + "[-Cdfnpvy] [-B | -F] [-T fstype:fsoptions] [-t fstype]"; (void)fprintf(stderr, "usage: %s %s [special | node] ...\n", getprogname(), common); Modified: user/thompsa/usb/sbin/fsck/fsutil.h ============================================================================== --- user/thompsa/usb/sbin/fsck/fsutil.h Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/sbin/fsck/fsutil.h Sun Feb 1 01:04:31 2009 (r187971) @@ -48,6 +48,7 @@ char *estrdup(const char *); #define CHECK_DEBUG 0x0004 #define CHECK_BACKGRD 0x0008 #define DO_BACKGRD 0x0010 +#define CHECK_CLEAN 0x0020 struct fstab; int checkfstab(int, int (*)(struct fstab *), Modified: user/thompsa/usb/sbin/fsck_ffs/fsck.h ============================================================================== --- user/thompsa/usb/sbin/fsck_ffs/fsck.h Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/sbin/fsck_ffs/fsck.h Sun Feb 1 01:04:31 2009 (r187971) @@ -271,6 +271,7 @@ int bkgrdflag; /* use a snapshot to run int bflag; /* location of alternate super block */ int debug; /* output debugging info */ char damagedflag; /* run in damaged mode */ +char ckclean; /* only do work if not cleanly unmounted */ int cvtlevel; /* convert to newer file system format */ int bkgrdcheck; /* determine if background check is possible */ int bkgrdsumadj; /* whether the kernel have ability to adjust superblock summary */ Modified: user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8 ============================================================================== --- user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8 Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/sbin/fsck_ffs/fsck_ffs.8 Sun Feb 1 01:04:31 2009 (r187971) @@ -29,7 +29,7 @@ .\" @(#)fsck.8 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd January 20, 2009 +.Dd January 25, 2009 .Dt FSCK_FFS 8 .Os .Sh NAME @@ -46,9 +46,9 @@ .Ar ... .Sh DESCRIPTION The specified disk partitions and/or file systems are checked. -In "preen" mode the clean flag of each file system's superblock is examined -and only those file systems that -are not marked clean are checked. +In "preen" or "check clean" mode the clean flag of each file system's +superblock is examined and only those file systems that are not marked clean +are checked. File systems are marked clean when they are unmounted, when they have been mounted read-only, or when .Nm @@ -175,6 +175,14 @@ Use the block specified immediately afte the super block for the file system. An alternate super block is usually located at block 32 for UFS1, and block 160 for UFS2. +.It Fl C +Check if file system was dismouted cleanly. +If so, skip file system checks (like "preen"). +However, if the file system was not cleanly dismounted, do full checks, +is if +.Nm +was invoked without +.Fl C . .It Fl c Convert the file system to the specified level. Note that the level of a file system can only be raised. Modified: user/thompsa/usb/sbin/fsck_ffs/main.c ============================================================================== --- user/thompsa/usb/sbin/fsck_ffs/main.c Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/sbin/fsck_ffs/main.c Sun Feb 1 01:04:31 2009 (r187971) @@ -82,7 +82,7 @@ main(int argc, char *argv[]) sync(); skipclean = 1; damagedflag = 0; - while ((ch = getopt(argc, argv, "b:Bc:dDfFm:npy")) != -1) { + while ((ch = getopt(argc, argv, "b:Bc:CdDfFm:npy")) != -1) { switch (ch) { case 'b': skipclean = 0; @@ -132,6 +132,10 @@ main(int argc, char *argv[]) case 'p': preen++; + /*FALLTHROUGH*/ + + case 'C': + ckclean++; break; case 'y': @@ -151,7 +155,7 @@ main(int argc, char *argv[]) if (signal(SIGINT, SIG_IGN) != SIG_IGN) (void)signal(SIGINT, catch); - if (preen) + if (ckclean) (void)signal(SIGQUIT, catchquit); signal(SIGINFO, infohandler); if (bkgrdflag) { @@ -215,7 +219,7 @@ checkfilesys(char *filesys) errmsg[0] = '\0'; cdevname = filesys; - if (debug && preen) + if (debug && ckclean) pwarn("starting\n"); /* * Make best effort to get the disk name. Check first to see @@ -250,7 +254,7 @@ checkfilesys(char *filesys) exit(7); /* Filesystem clean, report it now */ exit(0); } - if (preen && skipclean) { + if (ckclean && skipclean) { /* * If file system is gjournaled, check it here. */ @@ -301,7 +305,7 @@ checkfilesys(char *filesys) "CANNOT RUN IN BACKGROUND\n"); } if ((sblock.fs_flags & FS_UNCLEAN) == 0 && - skipclean && preen) { + skipclean && ckclean) { /* * file system is clean; * skip snapshot and report it clean Modified: user/thompsa/usb/sbin/fsck_ffs/setup.c ============================================================================== --- user/thompsa/usb/sbin/fsck_ffs/setup.c Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/sbin/fsck_ffs/setup.c Sun Feb 1 01:04:31 2009 (r187971) @@ -65,7 +65,7 @@ static struct disklabel *getdisklabel(ch /* * Read in a superblock finding an alternate if necessary. * Return 1 if successful, 0 if unsuccessful, -1 if file system - * is already clean (preen mode only). + * is already clean (ckclean and preen mode only). */ int setup(char *dev) @@ -201,7 +201,7 @@ setup(char *dev) pwarn("USING ALTERNATE SUPERBLOCK AT %d\n", bflag); bflag = 0; } - if (skipclean && preen && sblock.fs_clean) { + if (skipclean && ckclean && sblock.fs_clean) { pwarn("FILE SYSTEM CLEAN; SKIPPING CHECKS\n"); return (-1); } Modified: user/thompsa/usb/sbin/ifconfig/ifieee80211.c ============================================================================== --- user/thompsa/usb/sbin/ifconfig/ifieee80211.c Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/sbin/ifconfig/ifieee80211.c Sun Feb 1 01:04:31 2009 (r187971) @@ -1789,6 +1789,19 @@ chanlookup(const struct ieee80211_channe return NULL; } +static int +chanfind(const struct ieee80211_channel chans[], int nchans, int flags) +{ + int i; + + for (i = 0; i < nchans; i++) { + const struct ieee80211_channel *c = &chans[i]; + if ((c->ic_flags & flags) == flags) + return 1; + } + return 0; +} + static void regdomain_addchans(struct ieee80211req_chaninfo *ci, const netband_head *bands, @@ -1799,53 +1812,72 @@ regdomain_addchans(struct ieee80211req_c const struct netband *nb; const struct freqband *b; struct ieee80211_channel *c, *prev; - int freq, channelSep; + int freq, channelSep, hasHalfChans, hasQuarterChans; channelSep = (chanFlags & IEEE80211_CHAN_2GHZ) ? 0 : 40; + hasHalfChans = chanfind(avail->ic_chans, avail->ic_nchans, + IEEE80211_CHAN_HALF | + (chanFlags & (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ))); + hasQuarterChans = chanfind(avail->ic_chans, avail->ic_nchans, + IEEE80211_CHAN_QUARTER | + (chanFlags & (IEEE80211_CHAN_2GHZ | IEEE80211_CHAN_5GHZ))); LIST_FOREACH(nb, bands, next) { b = nb->band; - if (verbose) - printf("%s: chanFlags 0x%x b %p\n", - __func__, chanFlags, b); + if (verbose) { + printf("%s:", __func__); + printb(" chanFlags", chanFlags, IEEE80211_CHAN_BITS); + printb(" bandFlags", nb->flags | b->flags, + IEEE80211_CHAN_BITS); + putchar('\n'); + } prev = NULL; for (freq = b->freqStart; freq <= b->freqEnd; freq += b->chanSep) { uint32_t flags = nb->flags | b->flags; /* check if device can operate on this frequency */ - if (chanlookup(avail->ic_chans, avail->ic_nchans, freq, chanFlags) == NULL) { - if (verbose) - printf("%u: skip, flags 0x%x not available\n", freq, chanFlags); - continue; - } /* - * NB: don't enforce 1/2 and 1/4 rate channels being - * specified in the device's calibration list for - * 900MHz cards because most are not self-identifying. + * XXX GSM frequency mapping is handled in the kernel + * so we cannot find them in the calibration table; + * just construct the list and the kernel will reject + * if it's wrong. */ - if ((flags & IEEE80211_CHAN_HALF) && - ((chanFlags & IEEE80211_CHAN_HALF) == 0 && - (flags & IEEE80211_CHAN_GSM) == 0)) { + if (chanlookup(avail->ic_chans, avail->ic_nchans, freq, chanFlags) == NULL && + (flags & IEEE80211_CHAN_GSM) == 0) { + if (verbose) { + printf("%u: skip, ", freq); + printb("flags", chanFlags, + IEEE80211_CHAN_BITS); + printf(" not available\n"); + } + continue; + } + if ((flags & IEEE80211_CHAN_HALF) && !hasHalfChans) { if (verbose) - printf("%u: skip, device does not support half-rate channels\n", freq); + printf("%u: skip, device does not " + "support half-rate channel\n", + freq); continue; } if ((flags & IEEE80211_CHAN_QUARTER) && - ((chanFlags & IEEE80211_CHAN_QUARTER) == 0 && - (flags & IEEE80211_CHAN_GSM) == 0)) { + !hasQuarterChans) { if (verbose) - printf("%u: skip, device does not support quarter-rate channels\n", freq); + printf("%u: skip, device does not " + "support quarter-rate channel\n", + freq); continue; } if ((flags & IEEE80211_CHAN_HT20) && (chanFlags & IEEE80211_CHAN_HT20) == 0) { if (verbose) - printf("%u: skip, device does not support HT20 operation\n", freq); + printf("%u: skip, device does not " + "support HT20 operation\n", freq); continue; } if ((flags & IEEE80211_CHAN_HT40) && (chanFlags & IEEE80211_CHAN_HT40) == 0) { if (verbose) - printf("%u: skip, device does not support HT40 operation\n", freq); + printf("%u: skip, device does not " + "support HT40 operation\n", freq); continue; } if ((flags & REQ_ECM) && !reg->ecm) { @@ -1868,7 +1900,8 @@ regdomain_addchans(struct ieee80211req_c } if (ci->ic_nchans == IEEE80211_CHAN_MAX) { if (verbose) - printf("%u: skip, channel table full\n", freq); + printf("%u: skip, channel table full\n", + freq); break; } c = &ci->ic_chans[ci->ic_nchans++]; @@ -1880,10 +1913,12 @@ regdomain_addchans(struct ieee80211req_c c->ic_maxregpower = nb->maxPowerDFS; else c->ic_maxregpower = nb->maxPower; - if (verbose) - printf("[%3d] add freq %u flags 0x%x power %u\n", - ci->ic_nchans-1, c->ic_freq, c->ic_flags, - c->ic_maxregpower); + if (verbose) { + printf("[%3d] add freq %u ", + ci->ic_nchans-1, c->ic_freq); + printb("flags", c->ic_flags, IEEE80211_CHAN_BITS); + printf(" power %u\n", c->ic_maxregpower); + } /* NB: kernel fills in other fields */ prev = c; } @@ -1932,26 +1967,12 @@ regdomain_makechannels( if (!LIST_EMPTY(&rd->bands_11b)) regdomain_addchans(ci, &rd->bands_11b, reg, IEEE80211_CHAN_B, &dc->dc_chaninfo); - if (!LIST_EMPTY(&rd->bands_11g)) { + if (!LIST_EMPTY(&rd->bands_11g)) regdomain_addchans(ci, &rd->bands_11g, reg, IEEE80211_CHAN_G, &dc->dc_chaninfo); - regdomain_addchans(ci, &rd->bands_11g, reg, - IEEE80211_CHAN_G | IEEE80211_CHAN_HALF, - &dc->dc_chaninfo); - regdomain_addchans(ci, &rd->bands_11g, reg, - IEEE80211_CHAN_G | IEEE80211_CHAN_QUARTER, - &dc->dc_chaninfo); - } - if (!LIST_EMPTY(&rd->bands_11a)) { + if (!LIST_EMPTY(&rd->bands_11a)) regdomain_addchans(ci, &rd->bands_11a, reg, IEEE80211_CHAN_A, &dc->dc_chaninfo); - regdomain_addchans(ci, &rd->bands_11a, reg, - IEEE80211_CHAN_A | IEEE80211_CHAN_HALF, - &dc->dc_chaninfo); - regdomain_addchans(ci, &rd->bands_11a, reg, - IEEE80211_CHAN_A | IEEE80211_CHAN_QUARTER, - &dc->dc_chaninfo); - } if (!LIST_EMPTY(&rd->bands_11na)) { regdomain_addchans(ci, &rd->bands_11na, reg, IEEE80211_CHAN_A | IEEE80211_CHAN_HT20, @@ -3098,23 +3119,16 @@ get_chaninfo(const struct ieee80211_chan buf[0] = '\0'; if (IEEE80211_IS_CHAN_FHSS(c)) strlcat(buf, " FHSS", bsize); - if (IEEE80211_IS_CHAN_A(c)) { - if (IEEE80211_IS_CHAN_HALF(c)) - strlcat(buf, " 11a/10Mhz", bsize); - else if (IEEE80211_IS_CHAN_QUARTER(c)) - strlcat(buf, " 11a/5Mhz", bsize); - else - strlcat(buf, " 11a", bsize); - } - if (IEEE80211_IS_CHAN_ANYG(c)) { - if (IEEE80211_IS_CHAN_HALF(c)) - strlcat(buf, " 11g/10Mhz", bsize); - else if (IEEE80211_IS_CHAN_QUARTER(c)) - strlcat(buf, " 11g/5Mhz", bsize); - else - strlcat(buf, " 11g", bsize); - } else if (IEEE80211_IS_CHAN_B(c)) + if (IEEE80211_IS_CHAN_A(c)) + strlcat(buf, " 11a", bsize); + else if (IEEE80211_IS_CHAN_ANYG(c)) + strlcat(buf, " 11g", bsize); + else if (IEEE80211_IS_CHAN_B(c)) strlcat(buf, " 11b", bsize); + if (IEEE80211_IS_CHAN_HALF(c)) + strlcat(buf, "/10Mhz", bsize); + if (IEEE80211_IS_CHAN_QUARTER(c)) + strlcat(buf, "/5Mhz", bsize); if (IEEE80211_IS_CHAN_TURBO(c)) strlcat(buf, " Turbo", bsize); if (precise) { @@ -3142,6 +3156,30 @@ print_chaninfo(const struct ieee80211_ch get_chaninfo(c, verb, buf, sizeof(buf))); } +static int +chanpref(const struct ieee80211_channel *c) +{ + if (IEEE80211_IS_CHAN_HT40(c)) + return 40; + if (IEEE80211_IS_CHAN_HT20(c)) + return 30; + if (IEEE80211_IS_CHAN_HALF(c)) + return 10; + if (IEEE80211_IS_CHAN_QUARTER(c)) + return 5; + if (IEEE80211_IS_CHAN_TURBO(c)) + return 25; + if (IEEE80211_IS_CHAN_A(c)) + return 20; + if (IEEE80211_IS_CHAN_G(c)) + return 20; + if (IEEE80211_IS_CHAN_B(c)) + return 15; + if (IEEE80211_IS_CHAN_PUREG(c)) + return 15; + return 0; +} + static void print_channels(int s, const struct ieee80211req_chaninfo *chans, int allchans, int verb) @@ -3185,7 +3223,10 @@ print_channels(int s, const struct ieee8 /* suppress duplicates as above */ if (isset(reported, c->ic_ieee) && !verb) { /* XXX we assume duplicates are adjacent */ - achans->ic_chans[achans->ic_nchans-1] = *c; + struct ieee80211_channel *a = + &achans->ic_chans[achans->ic_nchans-1]; + if (chanpref(c) > chanpref(a)) + *a = *c; } else { achans->ic_chans[achans->ic_nchans++] = *c; setbit(reported, c->ic_ieee); @@ -3301,10 +3342,13 @@ list_capabilities(int s) { struct ieee80211_devcaps_req *dc; - dc = malloc(IEEE80211_DEVCAPS_SIZE(1)); + if (verbose) + dc = malloc(IEEE80211_DEVCAPS_SIZE(MAXCHAN)); + else + dc = malloc(IEEE80211_DEVCAPS_SIZE(1)); if (dc == NULL) errx(1, "no space for device capabilities"); - dc->dc_chaninfo.ic_nchans = 1; + dc->dc_chaninfo.ic_nchans = verbose ? MAXCHAN : 1; getdevcaps(s, dc); printb("drivercaps", dc->dc_drivercaps, IEEE80211_C_BITS); if (dc->dc_cryptocaps != 0 || verbose) { @@ -3316,6 +3360,10 @@ list_capabilities(int s) printb("htcaps", dc->dc_htcaps, IEEE80211_HTCAP_BITS); } putchar('\n'); + if (verbose) { + chaninfo = &dc->dc_chaninfo; /* XXX */ + print_channels(s, &dc->dc_chaninfo, 1/*allchans*/, verbose); + } free(dc); } Modified: user/thompsa/usb/sbin/reboot/reboot.c ============================================================================== --- user/thompsa/usb/sbin/reboot/reboot.c Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/sbin/reboot/reboot.c Sun Feb 1 01:04:31 2009 (r187971) @@ -65,7 +65,7 @@ int main(int argc, char *argv[]) { const struct passwd *pw; - int ch, howto, i, fd, lflag, nflag, qflag, pflag, sverrno; + int ch, howto, i, fd, lflag, nflag, qflag, sverrno; u_int pageins; const char *p, *user, *kernel = NULL; @@ -91,7 +91,6 @@ main(int argc, char *argv[]) howto |= RB_NOSYNC; break; case 'p': - pflag = 1; howto |= RB_POWEROFF; break; case 'q': Modified: user/thompsa/usb/share/man/man4/ng_bpf.4 ============================================================================== --- user/thompsa/usb/share/man/man4/ng_bpf.4 Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/share/man/man4/ng_bpf.4 Sun Feb 1 01:04:31 2009 (r187971) @@ -156,21 +156,14 @@ INHOOK="hook1" MATCHHOOK="hook2" NOTMATCHHOOK="hook3" -cat > /tmp/bpf.awk << xxENDxx -{ - if (!init) { - printf "bpf_prog_len=%d bpf_prog=[", \\$1; - init=1; - } else { - printf " { code=%d jt=%d jf=%d k=%d }", \\$1, \\$2, \\$3, \\$4; - } -} -END { - print " ]" -} -xxENDxx - -BPFPROG=`tcpdump -s 8192 -ddd ${PATTERN} | awk -f /tmp/bpf.awk` +BPFPROG=$( tcpdump -s 8192 -ddd ${PATTERN} | \\ + ( read len ; \\ + echo -n "bpf_prog_len=$len" ; \\ + echo -n "bpf_prog=[" ; \\ + while read code jt jf k ; do \\ + echo -n " { code=$code jt=$jt jf=$jf k=$k }" ; \\ + done ; \\ + echo " ]" ) ) ngctl msg ${NODEPATH} setprogram { thisHook=\\"${INHOOK}\\" \\ ifMatch=\\"${MATCHHOOK}\\" \\ Modified: user/thompsa/usb/share/man/man5/rc.conf.5 ============================================================================== --- user/thompsa/usb/share/man/man5/rc.conf.5 Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/share/man/man5/rc.conf.5 Sun Feb 1 01:04:31 2009 (r187971) @@ -2065,16 +2065,12 @@ If set to .Xr ntpd 8 is run with the .Fl g -and -.Fl q -flags, which syncs the system's clock on startup. +flag, which syncs the system's clock on startup. See .Xr ntpd 8 for more information regarding the .Fl g -and -.Fl q -options. +option. This is a preferred alternative to using .Xr ntpdate 8 or specifying the Modified: user/thompsa/usb/share/man/man7/Makefile ============================================================================== --- user/thompsa/usb/share/man/man7/Makefile Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/share/man/man7/Makefile Sun Feb 1 01:04:31 2009 (r187971) @@ -2,7 +2,8 @@ # $FreeBSD$ #MISSING: eqnchar.7 ms.7 term.7 -MAN= ascii.7 \ +MAN= adding_user.7 \ + ascii.7 \ bsd.snmpmod.mk.7 \ build.7 \ clocks.7 \ Modified: user/thompsa/usb/share/man/man8/Makefile ============================================================================== --- user/thompsa/usb/share/man/man8/Makefile Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/share/man/man8/Makefile Sun Feb 1 01:04:31 2009 (r187971) @@ -1,8 +1,7 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ -MAN= adding_user.8 \ - crash.8 \ +MAN= crash.8 \ diskless.8 \ intro.8 \ MAKEDEV.8 \ Modified: user/thompsa/usb/share/misc/committers-src.dot ============================================================================== --- user/thompsa/usb/share/misc/committers-src.dot Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/share/misc/committers-src.dot Sun Feb 1 01:04:31 2009 (r187971) @@ -102,6 +102,7 @@ iedowse [label="Ian Dowse\niedowse@FreeB imp [label="Warner Losh\nimp@FreeBSD.org\n1996/09/20"] ivoras [label="Ivan Voras\nivoras@FreeBSD.org\n2008/06/10"] jake [label="Jake Burkholder\njake@FreeBSD.org\n2000/05/16"] +jamie [label="Jamie Gritton\njamie@FreeBSD.org\n2009/01/28"] jayanth [label="Jayanth Vijayaraghavan\njayanth@FreeBSD.org\n2000/05/08"] jinmei [label="JINMEI Tatuya\njinmei@FreeBSD.org\n2007/03/17"] jdp [label="John Polstra\njdp@FreeBSD.org\n????/??/??"] @@ -219,7 +220,9 @@ bms -> thompsa brian -> joe brooks -> bushman +brooks -> jamie +bz -> jamie bz -> syrinx cperciva -> flz Modified: user/thompsa/usb/sys/amd64/amd64/cpu_switch.S ============================================================================== --- user/thompsa/usb/sys/amd64/amd64/cpu_switch.S Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/sys/amd64/amd64/cpu_switch.S Sun Feb 1 01:04:31 2009 (r187971) @@ -260,12 +260,12 @@ do_kthread: jmp do_tss store_seg: - movl %gs,PCB_GS(%r8) + mov %gs,PCB_GS(%r8) testl $PCB_GS32BIT,PCB_FLAGS(%r8) jnz 2f -1: movl %ds,PCB_DS(%r8) - movl %es,PCB_ES(%r8) - movl %fs,PCB_FS(%r8) +1: mov %ds,PCB_DS(%r8) + mov %es,PCB_ES(%r8) + mov %fs,PCB_FS(%r8) jmp done_store_seg 2: movq PCPU(GS32P),%rax movq (%rax),%rax @@ -277,11 +277,11 @@ load_seg: jnz 2f 1: movl $MSR_GSBASE,%ecx rdmsr - movl PCB_GS(%r8),%gs + mov PCB_GS(%r8),%gs wrmsr - movl PCB_DS(%r8),%ds - movl PCB_ES(%r8),%es - movl PCB_FS(%r8),%fs + mov PCB_DS(%r8),%ds + mov PCB_ES(%r8),%es + mov PCB_FS(%r8),%fs jmp restore_fsbase /* Restore userland %gs while preserving kernel gsbase */ 2: movq PCPU(GS32P),%rax Modified: user/thompsa/usb/sys/amd64/amd64/fpu.c ============================================================================== --- user/thompsa/usb/sys/amd64/amd64/fpu.c Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/sys/amd64/amd64/fpu.c Sun Feb 1 01:04:31 2009 (r187971) @@ -391,6 +391,7 @@ fpudna() { struct pcb *pcb; register_t s; + u_short control; if (PCPU_GET(fpcurthread) == curthread) { printf("fpudna: fpcurthread == curthread %d times\n", @@ -421,6 +422,10 @@ fpudna() * explicitly load sanitized registers. */ fxrstor(&fpu_cleanstate); + if (pcb->pcb_flags & PCB_32BIT) { + control = __INITIAL_FPUCW_I386__; + fldcw(&control); + } pcb->pcb_flags |= PCB_FPUINITDONE; } else fxrstor(&pcb->pcb_save); Modified: user/thompsa/usb/sys/amd64/amd64/io_apic.c ============================================================================== --- user/thompsa/usb/sys/amd64/amd64/io_apic.c Sun Feb 1 00:51:25 2009 (r187970) +++ user/thompsa/usb/sys/amd64/amd64/io_apic.c Sun Feb 1 01:04:31 2009 (r187971) @@ -327,39 +327,56 @@ ioapic_assign_cpu(struct intsrc *isrc, u { struct ioapic_intsrc *intpin = (struct ioapic_intsrc *)isrc; struct ioapic *io = (struct ioapic *)isrc->is_pic; + u_int old_vector; + u_int old_id; + /* + * keep 1st core as the destination for NMI + */ + if (intpin->io_irq == IRQ_NMI) + apic_id = 0; + + /* + * Set us up to free the old irq. + */ + old_vector = intpin->io_vector; + old_id = intpin->io_cpu; + if (old_vector && apic_id == old_id) + return; + + /* + * Allocate an APIC vector for this interrupt pin. Once + * we have a vector we program the interrupt pin. + */ intpin->io_cpu = apic_id; + intpin->io_vector = apic_alloc_vector(apic_id, intpin->io_irq); if (bootverbose) { - printf("ioapic%u: Assigning ", io->io_id); + printf("ioapic%u: routing intpin %u (", io->io_id, + intpin->io_intpin); ioapic_print_irq(intpin); - printf(" to local APIC %u\n", intpin->io_cpu); + printf(") to lapic %u vector %u\n", intpin->io_cpu, + intpin->io_vector); } ioapic_program_intpin(intpin); + /* + * Free the old vector after the new one is established. This is done + * to prevent races where we could miss an interrupt. + */ + if (old_vector) + apic_free_vector(old_id, old_vector, intpin->io_irq); } static void ioapic_enable_intr(struct intsrc *isrc) { struct ioapic_intsrc *intpin = (struct ioapic_intsrc *)isrc; - struct ioapic *io = (struct ioapic *)isrc->is_pic; - if (intpin->io_vector == 0) { - /* - * Allocate an APIC vector for this interrupt pin. Once - * we have a vector we program the interrupt pin. - */ - intpin->io_vector = apic_alloc_vector(intpin->io_irq); - if (bootverbose) { - printf("ioapic%u: routing intpin %u (", io->io_id, - intpin->io_intpin); - ioapic_print_irq(intpin); - printf(") to vector %u\n", intpin->io_vector); - } - ioapic_program_intpin(intpin); - apic_enable_vector(intpin->io_vector); - } + if (intpin->io_vector == 0) + ioapic_assign_cpu(isrc, pcpu_find(0)->pc_apic_id); *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902010104.n1114V07038779>