Date: Sat, 19 Jun 2004 00:30:54 GMT From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 55277 for review Message-ID: <200406190030.i5J0UsPM095229@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=55277 Change 55277 by marcel@marcel_nfs on 2004/06/19 00:30:10 IFC @55276 Affected files ... .. //depot/projects/gdb/contrib/libpcap/pcap-bpf.c#4 integrate .. //depot/projects/gdb/etc/defaults/rc.conf#11 integrate .. //depot/projects/gdb/etc/rc.d/syscons#3 integrate .. //depot/projects/gdb/libexec/rtld-elf/rtld.c#6 integrate .. //depot/projects/gdb/libexec/rtld-elf/sparc64/rtld_machdep.h#2 integrate .. //depot/projects/gdb/libexec/rtld-elf/sparc64/rtld_start.S#2 integrate .. //depot/projects/gdb/sbin/conscontrol/conscontrol.8#4 integrate .. //depot/projects/gdb/sbin/conscontrol/conscontrol.c#3 integrate .. //depot/projects/gdb/sbin/sunlabel/sunlabel.c#5 integrate .. //depot/projects/gdb/share/man/man4/netintro.4#2 integrate .. //depot/projects/gdb/share/man/man5/rc.conf.5#12 integrate .. //depot/projects/gdb/share/mk/bsd.kmod.mk#2 integrate .. //depot/projects/gdb/sys/amd64/amd64/fpu.c#6 integrate .. //depot/projects/gdb/sys/compat/linux/linux_ioctl.c#4 integrate .. //depot/projects/gdb/sys/compat/linux/linux_ioctl.h#4 integrate .. //depot/projects/gdb/sys/contrib/dev/ath/freebsd/ah_osdep.c#2 integrate .. //depot/projects/gdb/sys/dev/acpica/Osd/OsdHardware.c#4 integrate .. //depot/projects/gdb/sys/dev/acpica/Osd/OsdSynch.c#4 integrate .. //depot/projects/gdb/sys/dev/ed/if_ed_pci.c#2 integrate .. //depot/projects/gdb/sys/dev/firewire/sbp.c#5 integrate .. //depot/projects/gdb/sys/fs/devfs/devfs_devs.c#5 integrate .. //depot/projects/gdb/sys/fs/fifofs/fifo_vnops.c#8 integrate .. //depot/projects/gdb/sys/geom/vinum/geom_vinum.c#2 integrate .. //depot/projects/gdb/sys/geom/vinum/geom_vinum_drive.c#3 integrate .. //depot/projects/gdb/sys/geom/vinum/geom_vinum_plex.c#3 integrate .. //depot/projects/gdb/sys/geom/vinum/geom_vinum_volume.c#3 integrate .. //depot/projects/gdb/sys/i386/isa/npx.c#7 integrate .. //depot/projects/gdb/sys/kern/kern_exit.c#11 integrate .. //depot/projects/gdb/sys/kern/kern_thread.c#14 integrate .. //depot/projects/gdb/sys/kern/subr_prf.c#5 integrate .. //depot/projects/gdb/sys/kern/uipc_socket.c#11 integrate .. //depot/projects/gdb/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c#8 integrate .. //depot/projects/gdb/sys/netinet/in_gif.c#3 integrate .. //depot/projects/gdb/sys/netinet/ip_input.c#10 integrate .. //depot/projects/gdb/sys/netinet/tcp_output.c#5 integrate .. //depot/projects/gdb/sys/netinet/tcp_usrreq.c#8 integrate .. //depot/projects/gdb/sys/sys/kernel.h#5 integrate .. //depot/projects/gdb/sys/ufs/ffs/ffs_snapshot.c#5 integrate Differences ... ==== //depot/projects/gdb/contrib/libpcap/pcap-bpf.c#4 (text+ko) ==== @@ -17,8 +17,6 @@ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * $FreeBSD: src/contrib/libpcap/pcap-bpf.c,v 1.2 2004/05/31 21:29:30 dwmalone Exp $ */ #ifndef lint static const char rcsid[] _U_ = @@ -469,7 +467,7 @@ */ do { (void)snprintf(device, sizeof(device), "/dev/bpf%d", n++); - fd = open(device, O_RDWR); + fd = open(device, O_RDONLY); } while (fd < 0 && errno == EBUSY); /* ==== //depot/projects/gdb/etc/defaults/rc.conf#11 (text+ko) ==== @@ -13,7 +13,7 @@ # # All arguments must be in double or single quotes. # -# $FreeBSD: src/etc/defaults/rc.conf,v 1.208 2004/06/02 09:58:18 ume Exp $ +# $FreeBSD: src/etc/defaults/rc.conf,v 1.209 2004/06/18 20:09:29 green Exp $ ############################################################## ### Important initial Boot-time options #################### @@ -347,6 +347,7 @@ ### System console options ################################# ############################################################## +keyboard="" # keyboard device to use (default /dev/kbd0). keymap="NO" # keymap in /usr/share/syscons/keymaps/* (or NO). keyrate="NO" # keyboard rate to: slow, normal, fast (or NO). keybell="NO" # See kbdcontrol(1) for options. Use "off" to disable. ==== //depot/projects/gdb/etc/rc.d/syscons#3 (text+ko) ==== @@ -24,7 +24,7 @@ # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # -# $FreeBSD: src/etc/rc.d/syscons,v 1.11 2004/03/08 12:25:05 pjd Exp $ +# $FreeBSD: src/etc/rc.d/syscons,v 1.12 2004/06/18 20:09:30 green Exp $ # # PROVIDE: syscons @@ -59,6 +59,13 @@ { echo -n 'Configuring syscons:' + # keyboard + # + if [ -n "${keyboard}" ]; then + echo -n ' keyboard'; kbdcontrol < ${kbddev} \ + -k "${keyboard}" >/dev/null + fi + # keymap # case ${keymap} in ==== //depot/projects/gdb/libexec/rtld-elf/rtld.c#6 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/rtld.c,v 1.96 2004/05/28 00:05:28 eik Exp $ + * $FreeBSD: src/libexec/rtld-elf/rtld.c,v 1.97 2004/06/18 02:01:37 tmm Exp $ */ /* @@ -162,6 +162,9 @@ extern Elf_Dyn _DYNAMIC; #pragma weak _DYNAMIC +#ifndef RTLD_IS_DYNAMIC +#define RTLD_IS_DYNAMIC() (&_DYNAMIC != NULL) +#endif /* * These are the functions the dynamic linker exports to application @@ -1008,7 +1011,7 @@ #ifdef PIC objtmp.relocbase = mapbase; #endif - if (&_DYNAMIC != 0) { + if (RTLD_IS_DYNAMIC()) { objtmp.dynamic = rtld_dynamic(&objtmp); digest_dynamic(&objtmp, 1); assert(objtmp.needed == NULL); ==== //depot/projects/gdb/libexec/rtld-elf/sparc64/rtld_machdep.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/sparc64/rtld_machdep.h,v 1.5 2003/07/04 00:05:15 jake Exp $ + * $FreeBSD: src/libexec/rtld-elf/sparc64/rtld_machdep.h,v 1.6 2004/06/18 02:01:37 tmm Exp $ */ #ifndef RTLD_MACHDEP_H @@ -37,7 +37,9 @@ struct Struct_Obj_Entry; /* Return the address of the .dynamic section in the dynamic linker. */ -Elf_Dyn *rtld_dynamic(const struct Struct_Obj_Entry *); +Elf_Dyn *rtld_dynamic_addr(); +#define rtld_dynamic(obj) rtld_dynamic_addr() +#define RTLD_IS_DYNAMIC() (rtld_dynamic_addr() != NULL) Elf_Addr reloc_jmpslot(Elf_Addr *, Elf_Addr, const struct Struct_Obj_Entry *, ==== //depot/projects/gdb/libexec/rtld-elf/sparc64/rtld_start.S#2 (text+ko) ==== @@ -37,7 +37,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/libexec/rtld-elf/sparc64/rtld_start.S,v 1.5 2003/07/04 00:05:15 jake Exp $ + * $FreeBSD: src/libexec/rtld-elf/sparc64/rtld_start.S,v 1.6 2004/06/18 02:01:37 tmm Exp $ */ #include <machine/asm.h> @@ -71,8 +71,9 @@ * Find the address of _DYNAMIC by disassembling a call instruction to it. * Binutils may not fill in the GOT as expected on other architectures. */ +.weak _DYNAMIC -ENTRY(rtld_dynamic) +ENTRY(rtld_dynamic_addr) save %sp, -CCFSZ, %sp call 1f nop @@ -82,7 +83,7 @@ sra %o0, 0, %o0 ret restore %o0, %o7, %o0 -END(rtld_dynamic) +END(rtld_dynamic_addr) /* * We have two separate entry points to the runtime linker. ==== //depot/projects/gdb/sbin/conscontrol/conscontrol.8#4 (text+ko) ==== @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/sbin/conscontrol/conscontrol.8,v 1.6 2004/05/17 08:35:39 ru Exp $ +.\" $FreeBSD: src/sbin/conscontrol/conscontrol.8,v 1.8 2004/06/18 20:06:04 green Exp $ .\" .Dd October 23, 2001 .Dt CONSCONTROL 8 @@ -89,10 +89,19 @@ Change the state of console muting. All console output is suppressed when console muting is .Cm on . +.It Cm set Ar console | Cm unset +Set or unset the virtual console. +When unset, output from the system, such as the kernel +.Xr printf 9 , +always goes out to the real main console. +When set, it goes to another. +This is an interface to the tty ioctl +.Dv TIOCCONS . .El .Sh SEE ALSO .Xr sio 4 , .Xr syscons 4 , +.Xr tty 4 , .Xr boot 8 , .Xr loader 8 .Sh HISTORY ==== //depot/projects/gdb/sbin/conscontrol/conscontrol.c#3 (text+ko) ==== @@ -25,13 +25,16 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sbin/conscontrol/conscontrol.c,v 1.3 2004/02/17 04:51:06 grog Exp $"); +__FBSDID("$FreeBSD: src/sbin/conscontrol/conscontrol.c,v 1.4 2004/06/18 06:33:44 green Exp $"); #include <sys/types.h> #include <sys/sysctl.h> +#include <sys/ioctl.h> +#include <sys/ttycom.h> #include <err.h> #include <errno.h> +#include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -43,10 +46,11 @@ usage(void) { - (void)fprintf(stderr, "%s\n%s\n%s\n", + (void)fprintf(stderr, "%s\n%s\n%s\n%s\n", "usage: conscontrol [list]", " conscontrol mute on | off", - " conscontrol add | delete console"); + " conscontrol add | delete console", + " conscontrol set console | unset"); exit(1); } @@ -148,6 +152,32 @@ free(buf); } +static void +consset(char *devnam) +{ + int ttyfd, flag = 1; + + ttyfd = open(devnam, O_RDONLY); + if (ttyfd == -1) + err(1, "opening %s", devnam); + if (ioctl(ttyfd, TIOCCONS, &flag) == -1) + err(1, "could not set %s as virtual console", devnam); + close(ttyfd); +} + +static void +consunset(void) +{ + int ttyfd, flag = 0; + + ttyfd = open(DEVDIR "console", O_RDONLY); + if (ttyfd == -1) + err(1, "opening virtual console"); + if (ioctl(ttyfd, TIOCCONS, &flag) == -1) + err(1, "could not unset virtual console"); + close(ttyfd); +} + int main(int argc, char **argv) { @@ -158,14 +188,18 @@ argv += optind; if (argc > 0 && strcmp(argv[0], "list") != 0) { - if (argc != 2) + if (argc == 1 && strcmp(argv[0], "unset") == 0) + consunset(); + else if (argc != 2) usage(); - if (strcmp(argv[0], "mute") == 0) + else if (strcmp(argv[0], "mute") == 0) consmute(argv[1]); else if (strcmp(argv[0], "add") == 0) consadd(argv[1]); else if (strcmp(argv[0], "delete") == 0) consdel(argv[1]); + else if (strcmp(argv[0], "set") == 0) + consset(argv[1]); else usage(); } ==== //depot/projects/gdb/sbin/sunlabel/sunlabel.c#5 (text+ko) ==== @@ -67,7 +67,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sbin/sunlabel/sunlabel.c,v 1.10 2004/06/11 11:41:33 joerg Exp $"); +__FBSDID("$FreeBSD: src/sbin/sunlabel/sunlabel.c,v 1.11 2004/06/18 15:08:08 joerg Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -293,7 +293,7 @@ if (havevtoc) { if (sl->sl_vtoc_map[i].svtoc_tag == VTOC_BACKUP) { warnx("only partition c is allowed to have " - "tag \"backup\""); + "tag \"backup\""); return (1); } } @@ -573,18 +573,18 @@ if (strncmp(bp, "text:", strlen("text:")) == 0) { bp += strlen("text:"); rv = sscanf(bp, - " %s cyl %u alt %u hd %u sec %u", - text, &cyl, &alt, &hd, &sec); + " %s cyl %u alt %u hd %u sec %u", + text, &cyl, &alt, &hd, &sec); if (rv != 5) { warnx("%s, line %d: text label does not " - "contain required fields", - file, line + 1); + "contain required fields", + file, line + 1); fclose(fp); return (1); } if (alt != 2) { warnx("%s, line %d: # alt must be equal 2", - file, line + 1); + file, line + 1); fclose(fp); return (1); } @@ -593,7 +593,7 @@ nr = cyl; unreasonable: warnx("%s, line %d: # %s %d unreasonable", - file, line + 1, what, nr); + file, line + 1, what, nr); fclose(fp); return (1); } @@ -609,14 +609,14 @@ } if (mediasize == 0) warnx("unit size unknown, no sector count " - "check could be done"); + "check could be done"); else if ((uintmax_t)(cyl + alt) * sec * hd > (uintmax_t)mediasize / sectorsize) { warnx("%s, line %d: sector count %ju exceeds " - "unit size %ju", - file, line + 1, - (uintmax_t)(cyl + alt) * sec * hd, - (uintmax_t)mediasize / sectorsize); + "unit size %ju", + file, line + 1, + (uintmax_t)(cyl + alt) * sec * hd, + (uintmax_t)mediasize / sectorsize); fclose(fp); return (1); } @@ -627,8 +627,8 @@ sl1.sl_ntracks = hd; memset(sl1.sl_text, 0, sizeof(sl1.sl_text)); snprintf(sl1.sl_text, sizeof(sl1.sl_text), - "%s cyl %u alt %u hd %u sec %u", - text, cyl, alt, hd, sec); + "%s cyl %u alt %u hd %u sec %u", + text, cyl, alt, hd, sec); continue; } if (strlen(bp) < 2 || bp[1] != ':') { @@ -636,7 +636,7 @@ continue; } rv = sscanf(bp, "%c: %30s %30s %30s %30s", - &part, size, offset, tag, flag); + &part, size, offset, tag, flag); if (rv < 3) { syntaxerr: warnx("%s: syntax error on line %d", @@ -760,8 +760,8 @@ secpercyl); if (eflag) fprintf(out, - "# max sectors/unit (including alt cylinders): %ju\n", - (uintmax_t)mediasize / sectorsize); + "# max sectors/unit (including alt cylinders): %ju\n", + (uintmax_t)mediasize / sectorsize); fprintf(out, "sectors/unit: %ju\n" "\n" @@ -776,8 +776,8 @@ " Use %%d%c, %%dK, %%dM or %%dG to specify in %s,\n" "# kilobytes, megabytes or gigabytes respectively, or '*' to specify rest of\n" "# disk.\n", - cflag? 's': 'c', - cflag? "sectors": "cylinders"); + cflag? 's': 'c', + cflag? "sectors": "cylinders"); else putc('\n', out); fprintf(out, "# Offset is in cylinders."); @@ -804,21 +804,23 @@ continue; if (hflag) { fprintf(out, " %c: %10s", - 'a' + i, - make_h_number((uintmax_t)sl->sl_part[i].sdkp_nsectors * 512)); + 'a' + i, + make_h_number((uintmax_t) + sl->sl_part[i].sdkp_nsectors * 512)); fprintf(out, " %10s", - make_h_number((uintmax_t)sl->sl_part[i].sdkp_cyloffset * - 512 * secpercyl)); + make_h_number((uintmax_t) + sl->sl_part[i].sdkp_cyloffset * 512 + * secpercyl)); } else { fprintf(out, " %c: %10ju %10u", - 'a' + i, - sl->sl_part[i].sdkp_nsectors / (cflag? secpercyl: 1), - sl->sl_part[i].sdkp_cyloffset); + 'a' + i, + sl->sl_part[i].sdkp_nsectors / (cflag? secpercyl: 1), + sl->sl_part[i].sdkp_cyloffset); } if (havevtoc) fprintf(out, " %11s %5s", - tagname(sl->sl_vtoc_map[i].svtoc_tag), - flagname(sl->sl_vtoc_map[i].svtoc_flag)); + tagname(sl->sl_vtoc_map[i].svtoc_tag), + flagname(sl->sl_vtoc_map[i].svtoc_flag)); putc('\n', out); } } ==== //depot/projects/gdb/share/man/man4/netintro.4#2 (text+ko) ==== @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)netintro.4 8.2 (Berkeley) 11/30/93 -.\" $FreeBSD: src/share/man/man4/netintro.4,v 1.22 2003/06/28 23:53:37 ru Exp $ +.\" $FreeBSD: src/share/man/man4/netintro.4,v 1.23 2004/06/18 13:07:18 des Exp $ .\" .Dd November 30, 1993 .Dt NETINTRO 4 @@ -205,10 +205,13 @@ struct sockaddr ifru_dstaddr; struct sockaddr ifru_broadaddr; short ifru_flags[2]; + short ifru_index; int ifru_metric; int ifru_mtu; int ifru_phys; + int ifru_media; caddr_t ifru_data; + int ifru_cap[2]; } ifr_ifru; #define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ @@ -218,7 +221,11 @@ #define ifr_metric ifr_ifru.ifru_metric /* metric */ #define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ #define ifr_phys ifr_ifru.ifru_phys /* physical wire */ +#define ifr_media ifr_ifru.ifru_media /* physical media */ #define ifr_data ifr_ifru.ifru_data /* for use by interface */ +#define ifr_reqcap ifr_ifru.ifru_cap[0] /* requested capabilities */ +#define ifr_curcap ifr_ifru.ifru_cap[1] /* current capabilities */ +#define ifr_index ifr_ifru.ifru_index /* interface index */ }; .Ed .Pp @@ -248,6 +255,19 @@ Get point to point address for protocol family and interface. .It Dv SIOCGIFBRDADDR Get broadcast address for protocol family and interface. +.It Dv SIOCSIFCAP +Set interface capabilities field to the value of the +.Va ifr_reqcap +field of the +.Vt ifreq +structure. +.It Dv SIOCGIFCAP +Get interface capabilities field. +Its value will be returned in the +.Va ifr_curcap +field of the +.Vt ifreq +structure. .It Dv SIOCSIFFLAGS Set interface flags field. If the interface is marked down, ==== //depot/projects/gdb/share/man/man5/rc.conf.5#12 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man5/rc.conf.5,v 1.217 2004/06/16 08:33:56 ru Exp $ +.\" $FreeBSD: src/share/man/man5/rc.conf.5,v 1.218 2004/06/18 01:28:33 bms Exp $ .\" .Dd April 25, 2004 .Dt RC.CONF 5 @@ -1691,6 +1691,12 @@ whose contents will later be passed to a .Dq Nm route Cm add operation. +For example: +.Bd -literal +static_routes="mcast gif0local" +route_mcast="-net 224.0.0.0/4 -iface gif0" +route_gif0local="-host 169.254.1.1 -iface lo0" +.Ed .It Va ipv6_static_routes .Pq Vt str The IPv6 equivalent of ==== //depot/projects/gdb/share/mk/bsd.kmod.mk#2 (text+ko) ==== @@ -1,8 +1,8 @@ -# $FreeBSD: src/share/mk/bsd.kmod.mk,v 1.88 2001/05/19 23:24:17 kris Exp $ +# $FreeBSD: src/share/mk/bsd.kmod.mk,v 1.89 2004/06/18 16:38:42 pjd Exp $ # Search for kernel source tree in standard places. .for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. ${.CURDIR}/../../../.. /sys /usr/src/sys -.if !defined(SYSDIR) && exists(${_dir}/conf/kmod.mk) +.if !defined(SYSDIR) && exists(${_dir}/kern) && exists(${_dir}/conf/kmod.mk) SYSDIR= ${_dir} .endif .endfor ==== //depot/projects/gdb/sys/amd64/amd64/fpu.c#6 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/fpu.c,v 1.153 2004/06/08 01:35:48 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/fpu.c,v 1.154 2004/06/18 04:01:54 peter Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -125,6 +125,8 @@ ldmxcsr(mxcsr); fxsave(&fpu_cleanstate); start_emulating(); + bzero(fpu_cleanstate.sv_fp, sizeof(fpu_cleanstate.sv_fp)); + bzero(fpu_cleanstate.sv_xmm, sizeof(fpu_cleanstate.sv_xmm)); fpu_cleanstate_ready = 1; intr_restore(savecrit); } @@ -384,7 +386,6 @@ { struct pcb *pcb; register_t s; - u_short control; if (PCPU_GET(fpcurthread) == curthread) { printf("fpudna: fpcurthread == curthread %d times\n", @@ -409,13 +410,10 @@ if ((pcb->pcb_flags & PCB_FPUINITDONE) == 0) { /* - * This is the first time this thread has used the FPU or - * the PCB doesn't contain a clean FPU state. Explicitly - * initialize the FPU and load the default control word. + * This is the first time this thread has used the FPU, + * explicitly load sanitized registers. */ - fninit(); - control = __INITIAL_FPUCW__; - fldcw(&control); + fxrstor(&fpu_cleanstate); pcb->pcb_flags |= PCB_FPUINITDONE; } else fxrstor(&pcb->pcb_save); ==== //depot/projects/gdb/sys/compat/linux/linux_ioctl.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.114 2004/06/14 07:26:23 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ioctl.c,v 1.119 2004/06/18 14:36:24 bms Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -1443,20 +1443,22 @@ } case LINUX_CDROMREADTOCENTRY: { - struct linux_cdrom_tocentry lte, *ltep = - (struct linux_cdrom_tocentry *)args->arg; + struct linux_cdrom_tocentry lte; struct ioc_read_toc_single_entry irtse; - irtse.address_format = ltep->cdte_format; - irtse.track = ltep->cdte_track; + + error = copyin((void *)args->arg, <e, sizeof(lte)); + if (error) + break; + irtse.address_format = lte.cdte_format; + irtse.track = lte.cdte_track; error = fo_ioctl(fp, CDIOREADTOCENTRY, (caddr_t)&irtse, td->td_ucred, td); if (!error) { - lte = *ltep; lte.cdte_ctrl = irtse.entry.control; lte.cdte_adr = irtse.entry.addr_type; bsd_to_linux_msf_lba(irtse.address_format, &irtse.entry.addr, <e.cdte_addr); - copyout(<e, (void *)args->arg, sizeof(lte)); + error = copyout(<e, (void *)args->arg, sizeof(lte)); } break; } @@ -1696,6 +1698,10 @@ args->cmd = SETDIR(SOUND_MIXER_WRITE_LINE3); return (ioctl(td, (struct ioctl_args *)args)); + case LINUX_SOUND_MIXER_INFO: + args->cmd = SETDIR(SOUND_MIXER_INFO); + return (ioctl(td, (struct ioctl_args *)args)); + case LINUX_OSS_GETVERSION: { int version = linux_get_oss_version(td); return (copyout(&version, (void *)args->arg, sizeof(int))); @@ -1705,6 +1711,10 @@ args->cmd = SOUND_MIXER_READ_STEREODEVS; return (ioctl(td, (struct ioctl_args *)args)); + case LINUX_SOUND_MIXER_READ_RECMASK: + args->cmd = SOUND_MIXER_READ_RECMASK; + return (ioctl(td, (struct ioctl_args *)args)); + case LINUX_SOUND_MIXER_READ_DEVMASK: args->cmd = SOUND_MIXER_READ_DEVMASK; return (ioctl(td, (struct ioctl_args *)args)); @@ -1941,11 +1951,14 @@ break; case LINUX_VT_SETMODE: { - struct vt_mode *mode; + struct vt_mode mode; + if ((error = copyin((void *)args->arg, &mode, sizeof(mode)))) + break; + if (!ISSIGVALID(mode.frsig) && ISSIGVALID(mode.acqsig)) + mode.frsig = mode.acqsig; + if ((error = copyout(&mode, (void *)args->arg, sizeof(mode)))) + break; args->cmd = VT_SETMODE; - mode = (struct vt_mode *)args->arg; - if (!ISSIGVALID(mode->frsig) && ISSIGVALID(mode->acqsig)) - mode->frsig = mode->acqsig; error = (ioctl(td, (struct ioctl_args *)args)); break; } @@ -2076,6 +2089,20 @@ if (error != 0) return (error); + /* handle the 'request buffer size' case */ + if (ifc.ifc_buf == NULL) { + ifc.ifc_len = 0; + TAILQ_FOREACH(ifp, &ifnet, if_link) { + TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { + struct sockaddr *sa = ifa->ifa_addr; + if (sa->sa_family == AF_INET) + ifc.ifc_len += sizeof(ifr); + } + } + error = copyout(&ifc, uifc, sizeof(ifc)); + return (error); + } + /* much easier to use uiomove than keep track ourselves */ iov.iov_base = ifc.ifc_buf; iov.iov_len = ifc.ifc_len; ==== //depot/projects/gdb/sys/compat/linux/linux_ioctl.h#4 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/linux/linux_ioctl.h,v 1.18 2004/06/14 07:26:23 phk Exp $ + * $FreeBSD: src/sys/compat/linux/linux_ioctl.h,v 1.20 2004/06/18 14:36:24 bms Exp $ */ #ifndef _LINUX_IOCTL_H_ @@ -227,8 +227,10 @@ #define LINUX_SOUND_MIXER_WRITE_LINE1 0x4d0E #define LINUX_SOUND_MIXER_WRITE_LINE2 0x4d0F #define LINUX_SOUND_MIXER_WRITE_LINE3 0x4d10 +#define LINUX_SOUND_MIXER_INFO 0x4d65 #define LINUX_OSS_GETVERSION 0x4d76 #define LINUX_SOUND_MIXER_READ_STEREODEVS 0x4dfb +#define LINUX_SOUND_MIXER_READ_RECMASK 0x4dfd #define LINUX_SOUND_MIXER_READ_DEVMASK 0x4dfe #define LINUX_SOUND_MIXER_WRITE_RECSRC 0x4dff #define LINUX_SNDCTL_DSP_RESET 0x5000 ==== //depot/projects/gdb/sys/contrib/dev/ath/freebsd/ah_osdep.c#2 (text+ko) ==== @@ -40,6 +40,7 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> +#include <sys/module.h> #include <sys/sysctl.h> #include <sys/bus.h> #include <sys/malloc.h> ==== //depot/projects/gdb/sys/dev/acpica/Osd/OsdHardware.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/Osd/OsdHardware.c,v 1.13 2004/04/14 03:39:08 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/Osd/OsdHardware.c,v 1.14 2004/06/18 17:56:45 njl Exp $ */ /* @@ -36,11 +36,7 @@ #include <machine/bus_pio.h> #include <machine/bus.h> #include <machine/pci_cfgreg.h> -#if __FreeBSD_version >= 500000 #include <dev/pci/pcireg.h> -#else -#include <pci/pcireg.h> -#endif /* * ACPICA's rather gung-ho approach to hardware resource ownership is a little ==== //depot/projects/gdb/sys/dev/acpica/Osd/OsdSynch.c#4 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/acpica/Osd/OsdSynch.c,v 1.21 2004/05/05 20:07:52 njl Exp $ + * $FreeBSD: src/sys/dev/acpica/Osd/OsdSynch.c,v 1.22 2004/06/18 17:58:11 njl Exp $ */ /* @@ -37,35 +37,23 @@ #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/sysctl.h> -#if __FreeBSD_version >= 500000 #include <sys/lock.h> #include <sys/mutex.h> -#endif #define _COMPONENT ACPI_OS_SERVICES ACPI_MODULE_NAME("SYNCH") MALLOC_DEFINE(M_ACPISEM, "acpisem", "ACPI semaphore"); -#if __FreeBSD_version < 500000 -# define AS_LOCK(as) s = splhigh() -# define AS_UNLOCK(as) splx(s) -# define AS_LOCK_DECL int s -# define msleep(a, b, c, d, e) tsleep(a, c, d, e) -#else -# define AS_LOCK(as) mtx_lock(&(as)->as_mtx) -# define AS_UNLOCK(as) mtx_unlock(&(as)->as_mtx) -# define AS_LOCK_DECL -#endif +#define AS_LOCK(as) mtx_lock(&(as)->as_mtx) +#define AS_UNLOCK(as) mtx_unlock(&(as)->as_mtx) /* * Simple counting semaphore implemented using a mutex. (Subsequently used * in the OSI code to implement a mutex. Go figure.) */ struct acpi_semaphore { -#if __FreeBSD_version >= 500000 struct mtx as_mtx; -#endif UINT32 as_units; UINT32 as_maxunits; UINT32 as_pendings; @@ -101,9 +89,7 @@ if ((as = malloc(sizeof(*as), M_ACPISEM, M_NOWAIT | M_ZERO)) == NULL) return_ACPI_STATUS (AE_NO_MEMORY); -#if __FreeBSD_version >= 500000 mtx_init(&as->as_mtx, "ACPI semaphore", NULL, MTX_DEF); -#endif as->as_units = InitialUnits; as->as_maxunits = MaxUnits; as->as_pendings = as->as_resetting = as->as_timeouts = 0; @@ -129,9 +115,7 @@ ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "destroyed semaphore %p\n", as)); -#if __FreeBSD_version >= 500000 mtx_destroy(&as->as_mtx); -#endif free(Handle, M_ACPISEM); #endif /* !ACPI_NO_SEMAPHORES */ @@ -151,7 +135,6 @@ struct acpi_semaphore *as = (struct acpi_semaphore *)Handle; int rv, tmo; struct timeval timeouttv, currenttv, timelefttv; - AS_LOCK_DECL; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -223,11 +206,9 @@ break; } -#if __FreeBSD_version >= 500000 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "semaphore blocked, calling msleep(%p, %p, %d, \"acsem\", %d)\n", as, &as->as_mtx, PCATCH, tmo)); -#endif as->as_pendings++; @@ -310,7 +291,6 @@ { #ifndef ACPI_NO_SEMAPHORES struct acpi_semaphore *as = (struct acpi_semaphore *)Handle; - AS_LOCK_DECL; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ==== //depot/projects/gdb/sys/dev/ed/if_ed_pci.c#2 (text+ko) ==== @@ -18,7 +18,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed_pci.c,v 1.34 2003/10/31 18:31:58 brooks Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ed/if_ed_pci.c,v 1.36 2004/06/18 01:28:54 imp Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -58,11 +58,11 @@ { 0x00000000, NULL } }; -static int ed_pci_probe (device_t); -static int ed_pci_attach (device_t); +static int ed_pci_probe(device_t); +static int ed_pci_attach(device_t); static int -ed_pci_probe (device_t dev) +ed_pci_probe(device_t dev) { u_int32_t type = pci_get_devid(dev); struct _pcsid *ep =pci_ids; @@ -71,10 +71,9 @@ ++ep; if (ep->desc) { device_set_desc(dev, ep->desc); - return 0; - } else { - return ENXIO; + return (0); } + return (ENXIO); } static int ==== //depot/projects/gdb/sys/dev/firewire/sbp.c#5 (text+ko) ==== @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.77 2004/06/15 16:03:49 dfr Exp $ + * $FreeBSD: src/sys/dev/firewire/sbp.c,v 1.78 2004/06/18 08:02:49 simokawa Exp $ * */ @@ -139,7 +139,7 @@ SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, max_speed, CTLFLAG_RW, &max_speed, 0, "SBP transfer max speed"); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, exclusive_login, CTLFLAG_RW, - &ex_login, 0, "SBP transfer max speed"); + &ex_login, 0, "SBP enable exclusive login"); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, login_delay, CTLFLAG_RW, &login_delay, 0, "SBP login delay in msec"); SYSCTL_INT(_hw_firewire_sbp, OID_AUTO, scan_delay, CTLFLAG_RW, ==== //depot/projects/gdb/sys/fs/devfs/devfs_devs.c#5 (text+ko) ==== @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000 + * Copyright (c) 2000,2004 * Poul-Henning Kamp. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ * * From: FreeBSD: src/sys/miscfs/kernfs/kernfs_vfsops.c 1.36 * - * $FreeBSD: src/sys/fs/devfs/devfs_devs.c,v 1.30 2004/06/16 09:47:03 phk Exp $ + * $FreeBSD: src/sys/fs/devfs/devfs_devs.c,v 1.31 2004/06/18 08:08:47 phk Exp $ */ #include "opt_devfs.h" @@ -59,7 +59,6 @@ static int devfs_noverflow; static unsigned devfs_generation; -static void devfs_attemptoverflow(int insist); static struct devfs_dirent *devfs_find (struct devfs_dirent *dd, const char *name, int namelen); SYSCTL_NODE(_vfs, OID_AUTO, devfs, CTLFLAG_RW, 0, "DEVFS filesystem"); @@ -138,43 +137,6 @@ return (NULL); } -static void -devfs_attemptoverflow(int insist) -{ - struct cdev ***ot; - int *or; - int n, nb; - - /* Check if somebody beat us to it */ - if (devfs_overflow != NULL) - return; - ot = NULL; - or = NULL; - n = devfs_noverflowwant; - nb = sizeof (struct cdev **) * n; - MALLOC(ot, struct cdev ***, nb, M_DEVFS, (insist ? M_WAITOK : M_NOWAIT) | M_ZERO); - if (ot == NULL) - goto bail; - nb = sizeof (int) * n; - MALLOC(or, int *, nb, M_DEVFS, (insist ? M_WAITOK : M_NOWAIT) | M_ZERO); - if (or == NULL) - goto bail; - if (!atomic_cmpset_ptr(&devfs_overflow, NULL, ot)) - goto bail; - devfs_refoverflow = or; - devfs_noverflow = n; - printf("DEVFS Overflow table with %d entries allocated when %d in use\n", n, devfs_numino); - return; - -bail: - /* Somebody beat us to it, or something went wrong. */ - if (ot != NULL) - FREE(ot, M_DEVFS); - if (or != NULL) - FREE(or, M_DEVFS); - return; -} - >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406190030.i5J0UsPM095229>