PERFORCE change 106771 for review
Paolo Pisati
piso at FreeBSD.org
Wed Sep 27 04:08:52 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=106771
Change 106771 by piso at piso_newluxor on 2006/09/27 11:08:27
IFC at 106770
Affected files ...
.. //depot/projects/soc2005/libalias/contrib/telnet/telnetd/telnetd.c#2 integrate
.. //depot/projects/soc2005/libalias/etc/Makefile#4 integrate
.. //depot/projects/soc2005/libalias/lib/libalias/Makefile#7 integrate
.. //depot/projects/soc2005/libalias/sbin/natd/natd.c#6 integrate
.. //depot/projects/soc2005/libalias/share/examples/mdoc/example.4#3 integrate
.. //depot/projects/soc2005/libalias/sys/conf/files#9 integrate
.. //depot/projects/soc2005/libalias/sys/dev/mfi/mfi.c#5 integrate
.. //depot/projects/soc2005/libalias/sys/dev/mfi/mfi_debug.c#2 integrate
.. //depot/projects/soc2005/libalias/sys/i386/i386/busdma_machdep.c#4 integrate
.. //depot/projects/soc2005/libalias/sys/modules/libalias/Makefile#8 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#15 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.h#5 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_cuseeme.c#14 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_db.c#12 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_ftp.c#13 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_irc.c#14 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_local.h#7 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#13 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_old.c#3 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_pptp.c#12 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_proxy.c#8 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_skinny.c#11 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_smedia.c#13 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_util.c#3 integrate
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/libalias.3#7 integrate
.. //depot/projects/soc2005/libalias/sys/pci/agp_i810.c#3 integrate
.. //depot/projects/soc2005/libalias/usr.bin/id/id.1#3 integrate
.. //depot/projects/soc2005/libalias/usr.bin/id/id.c#3 integrate
.. //depot/projects/soc2005/libalias/usr.sbin/vidcontrol/vidcontrol.c#2 integrate
Differences ...
==== //depot/projects/soc2005/libalias/contrib/telnet/telnetd/telnetd.c#2 (text+ko) ====
@@ -37,7 +37,7 @@
#endif
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/contrib/telnet/telnetd/telnetd.c,v 1.28 2005/05/21 15:28:42 ume Exp $");
+__FBSDID("$FreeBSD: src/contrib/telnet/telnetd/telnetd.c,v 1.29 2006/09/26 21:46:11 ru Exp $");
#include "telnetd.h"
#include "pathnames.h"
@@ -1168,7 +1168,7 @@
ptyflush(); /* half-hearted */
#ifdef TCSIG
- (void) ioctl(pty, TCSIG, (char *)SIGINT);
+ (void) ioctl(pty, TCSIG, SIGINT);
#else /* TCSIG */
init_termbuf();
*pfrontp++ = slctab[SLC_IP].sptr ?
@@ -1186,7 +1186,7 @@
{
ptyflush(); /* half-hearted */
#ifdef TCSIG
- (void) ioctl(pty, TCSIG, (char *)SIGQUIT);
+ (void) ioctl(pty, TCSIG, SIGQUIT);
#else /* TCSIG */
init_termbuf();
*pfrontp++ = slctab[SLC_ABORT].sptr ?
@@ -1200,7 +1200,7 @@
#ifdef SIGTSTP
ptyflush(); /* half-hearted */
# ifdef TCSIG
- (void) ioctl(pty, TCSIG, (char *)SIGTSTP);
+ (void) ioctl(pty, TCSIG, SIGTSTP);
# else /* TCSIG */
*pfrontp++ = slctab[SLC_SUSP].sptr ?
(unsigned char)*slctab[SLC_SUSP].sptr : '\032';
@@ -1217,7 +1217,7 @@
{
#if defined(SIGINFO) && defined(TCSIG)
if (slctab[SLC_AYT].sptr && *slctab[SLC_AYT].sptr != _POSIX_VDISABLE) {
- (void) ioctl(pty, TCSIG, (char *)SIGINFO);
+ (void) ioctl(pty, TCSIG, SIGINFO);
return;
}
#endif
==== //depot/projects/soc2005/libalias/etc/Makefile#4 (text+ko) ====
@@ -1,5 +1,5 @@
# from: @(#)Makefile 5.11 (Berkeley) 5/21/91
-# $FreeBSD: src/etc/Makefile,v 1.357 2006/08/31 09:51:33 cperciva Exp $
+# $FreeBSD: src/etc/Makefile,v 1.358 2006/09/26 23:26:48 piso Exp $
.include <bsd.own.mk>
==== //depot/projects/soc2005/libalias/lib/libalias/Makefile#7 (text+ko) ====
@@ -22,7 +22,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $FreeBSD$
+# $FreeBSD: src/lib/libalias/Makefile,v 1.32 2006/09/26 23:26:49 piso Exp $
SUBDIR= libalias modules
==== //depot/projects/soc2005/libalias/sbin/natd/natd.c#6 (text+ko) ====
@@ -11,7 +11,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/natd/natd.c,v 1.49 2005/05/02 10:13:38 delphij Exp $");
+__FBSDID("$FreeBSD: src/sbin/natd/natd.c,v 1.50 2006/09/26 23:26:51 piso Exp $");
#define SYSLOG_NAMES
==== //depot/projects/soc2005/libalias/share/examples/mdoc/example.4#3 (text+ko) ====
@@ -22,7 +22,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/share/examples/mdoc/example.4,v 1.25 2006/09/18 15:18:54 ru Exp $
+.\" $FreeBSD: src/share/examples/mdoc/example.4,v 1.26 2006/09/26 19:59:52 danger Exp $
.\"
.\" Note: The date here should be updated whenever a non-trivial
.\" change is made to the manual page.
@@ -33,11 +33,9 @@
.Nm example
.Nd "example device driver manual page"
.Sh SYNOPSIS
-To compile the
-.Ns Nm
-driver into the kernel,
-place the following lines in the
-kernel configuration file:
+To enable support for
+.Ns Nm ,
+place the following lines in the kernel configuration file:
.Bd -ragged -offset indent
.Cd "device example"
.Cd "options EXAMPLE_DEBUG"
@@ -45,9 +43,9 @@
.Pp
Alternatively, to load the
.Ns Nm
-driver as a
-module at boot time, place the following line in
-.Xr loader.conf 5 :
+as a module at boot time, add the following line into the
+.Xr loader.conf 5
+file:
.Bd -literal -offset indent
example_load="YES"
.Ed
==== //depot/projects/soc2005/libalias/sys/conf/files#9 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1143 2006/09/25 11:40:14 scottl Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1144 2006/09/26 23:26:51 piso Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
==== //depot/projects/soc2005/libalias/sys/dev/mfi/mfi.c#5 (text) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi.c,v 1.18 2006/09/25 11:35:34 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi.c,v 1.19 2006/09/27 05:00:10 scottl Exp $");
#include "opt_mfi.h"
@@ -2046,6 +2046,8 @@
deadline = time_uptime - MFI_CMD_TIMEOUT;
mtx_lock(&sc->mfi_io_lock);
TAILQ_FOREACH(cm, &sc->mfi_busy, cm_link) {
+ if (sc->mfi_aen_cm == cm)
+ continue;
if (cm->cm_timestamp < deadline) {
device_printf(sc->mfi_dev,
"COMMAND %p TIMEOUT AFTER %d SECONDS\n", cm,
==== //depot/projects/soc2005/libalias/sys/dev/mfi/mfi_debug.c#2 (text+ko) ====
@@ -25,9 +25,9 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi_debug.c,v 1.1 2006/09/25 11:35:34 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi_debug.c,v 1.2 2006/09/27 04:54:23 scottl Exp $");
-#include <opt_mfi.h>
+#include "opt_mfi.h"
#ifdef MFI_DEBUG
==== //depot/projects/soc2005/libalias/sys/i386/i386/busdma_machdep.c#4 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.83 2006/09/24 19:24:26 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.84 2006/09/26 23:14:42 scottl Exp $");
#include <sys/param.h>
#include <sys/kdb.h>
@@ -53,7 +53,6 @@
#include <machine/md_var.h>
#define MAX_BPAGES 512
-#define BUS_DMA_USE_FILTER BUS_DMA_BUS2
#define BUS_DMA_COULD_BOUNCE BUS_DMA_BUS3
#define BUS_DMA_MIN_ALLOC_COMP BUS_DMA_BUS4
@@ -269,8 +268,8 @@
newtag->boundary = MIN(parent->boundary,
newtag->boundary);
if ((newtag->filter != NULL) ||
- ((parent->flags & BUS_DMA_USE_FILTER) != 0))
- newtag->flags |= BUS_DMA_USE_FILTER;
+ ((parent->flags & BUS_DMA_COULD_BOUNCE) != 0))
+ newtag->flags |= BUS_DMA_COULD_BOUNCE;
if (newtag->filter == NULL) {
/*
* Short circuit looking at our parent directly
@@ -583,7 +582,7 @@
while (vaddr < vendaddr) {
paddr = pmap_kextract(vaddr);
- if (((dmat->flags & BUS_DMA_USE_FILTER) != 0) &&
+ if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) &&
run_filter(dmat, paddr) != 0) {
needbounce = 1;
map->pagesneeded++;
@@ -682,7 +681,7 @@
sgsize = (baddr - curaddr);
}
- if (((dmat->flags & BUS_DMA_USE_FILTER) != 0) &&
+ if (((dmat->flags & BUS_DMA_COULD_BOUNCE) != 0) &&
map->pagesneeded != 0 && run_filter(dmat, curaddr))
curaddr = add_bounce_page(dmat, map, vaddr, sgsize);
==== //depot/projects/soc2005/libalias/sys/modules/libalias/Makefile#8 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD$
+# $FreeBSD: src/sys/modules/libalias/Makefile,v 1.3 2006/09/26 23:26:51 piso Exp $
SUBDIR= libalias modules
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#15 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias.c,v 1.53 2005/06/27 22:21:42 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias.c,v 1.54 2006/09/26 23:26:53 piso Exp $");
/*
Alias.c provides supervisory control for the functions of the
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.h#5 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/netinet/libalias/alias.h,v 1.32 2005/05/05 21:53:17 glebius Exp $
+ * $FreeBSD: src/sys/netinet/libalias/alias.h,v 1.33 2006/09/26 23:26:53 piso Exp $
*/
/*
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_cuseeme.c#14 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_cuseeme.c,v 1.12 2005/05/05 21:55:17 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_cuseeme.c,v 1.13 2006/09/26 23:26:53 piso Exp $");
#ifdef _KERNEL
#include <sys/param.h>
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_db.c#12 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_db.c,v 1.68 2005/09/19 22:31:45 andre Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_db.c,v 1.69 2006/09/26 23:26:53 piso Exp $");
/*
Alias_db.c encapsulates all data structures used for storing
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_ftp.c#13 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_ftp.c,v 1.27 2005/06/27 07:36:02 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_ftp.c,v 1.28 2006/09/26 23:26:53 piso Exp $");
/*
Alias_ftp.c performs special processing for FTP sessions under
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_irc.c#14 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_irc.c,v 1.21 2005/06/27 07:36:02 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_irc.c,v 1.22 2006/09/26 23:26:53 piso Exp $");
/* Alias_irc.c intercepts packages contain IRC CTCP commands, and
changes DCC commands to export a port on the aliasing host instead
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_local.h#7 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/netinet/libalias/alias_local.h,v 1.32 2005/06/27 07:36:02 glebius Exp $
+ * $FreeBSD: src/sys/netinet/libalias/alias_local.h,v 1.33 2006/09/26 23:26:53 piso Exp $
*/
/*
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#13 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_nbt.c,v 1.19 2005/05/06 11:07:49 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_nbt.c,v 1.20 2006/09/26 23:26:53 piso Exp $");
/*
alias_nbt.c performs special processing for NetBios over TCP/IP
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_old.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_old.c,v 1.7 2005/05/05 19:27:32 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_old.c,v 1.8 2006/09/26 23:26:53 piso Exp $");
#ifdef _KERNEL
#include <sys/param.h>
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_pptp.c#12 (text+ko) ====
@@ -37,7 +37,170 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_pptp.c,v 1.14 2005/05/05 21:55:17 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_pptp.c,v 1.15 2006/09/26 23:26:53 piso Exp $");
+
+/* Includes */
+#ifdef _KERNEL
+#include <sys/param.h>
+#include <sys/limits.h>
+#include <sys/kernel.h>
+#include <sys/module.h>
+#else
+#include <errno.h>
+#include <limits.h>
+#include <sys/types.h>
+#include <stdio.h>
+#endif
+
+#include <netinet/tcp.h>
+
+#ifdef _KERNEL
+#include <netinet/libalias/alias.h>
+#include <netinet/libalias/alias_local.h>
+#include <netinet/libalias/alias_mod.h>
+#else
+#include "alias.h"
+#include "alias_local.h"
+#include "alias_mod.h"
+#endif
+
+#define PPTP_CONTROL_PORT_NUMBER 1723
+
+static void
+AliasHandlePptpOut(struct libalias *, struct ip *, struct alias_link *);
+
+static void
+AliasHandlePptpIn(struct libalias *, struct ip *, struct alias_link *);
+
+static int
+AliasHandlePptpGreOut(struct libalias *, struct ip *);
+
+static int
+AliasHandlePptpGreIn(struct libalias *, struct ip *);
+
+static int
+fingerprint(struct libalias *la, struct ip *pip, struct alias_data *ah)
+{
+
+ if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL)
+ return (-1);
+ if (ntohs(*ah->dport) == PPTP_CONTROL_PORT_NUMBER
+ || ntohs(*ah->sport) == PPTP_CONTROL_PORT_NUMBER)
+ return (0);
+ return (-1);
+}
+
+static int
+fingerprintgre(struct libalias *la, struct ip *pip, struct alias_data *ah)
+{
+
+ return (0);
+}
+
+static int
+protohandlerin(struct libalias *la, struct ip *pip, struct alias_data *ah)
+{
+
+ AliasHandlePptpIn(la, pip, ah->lnk);
+ return (0);
+}
+
+static int
+protohandlerout(struct libalias *la, struct ip *pip, struct alias_data *ah)
+{
+
+ AliasHandlePptpOut(la, pip, ah->lnk);
+ return (0);
+}
+
+static int
+protohandlergrein(struct libalias *la, struct ip *pip, struct alias_data *ah)
+{
+
+ if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY ||
+ AliasHandlePptpGreIn(la, pip) == 0)
+ return (0);
+ return (-1);
+}
+
+static int
+protohandlergreout(struct libalias *la, struct ip *pip, struct alias_data *ah)
+{
+
+ if (AliasHandlePptpGreOut(la, pip) == 0)
+ return (0);
+ return (-1);
+}
+
+/* Kernel module definition. */
+struct proto_handler handlers[] = {
+ {
+ .pri = 200,
+ .dir = IN,
+ .proto = TCP,
+ .fingerprint = &fingerprint,
+ .protohandler = &protohandlerin
+ },
+ {
+ .pri = 210,
+ .dir = OUT,
+ .proto = TCP,
+ .fingerprint = &fingerprint,
+ .protohandler = &protohandlerout
+ },
+/*
+ * WATCH OUT!!! these 2 handlers NEED a priority of INT_MAX (highest possible)
+ * cause they will ALWAYS process packets, so they must be the last one
+ * in chain: look fingerprintgre() above.
+ */
+ {
+ .pri = INT_MAX,
+ .dir = IN,
+ .proto = IP,
+ .fingerprint = &fingerprintgre,
+ .protohandler = &protohandlergrein
+ },
+ {
+ .pri = INT_MAX,
+ .dir = OUT,
+ .proto = IP,
+ .fingerprint = &fingerprintgre,
+ .protohandler = &protohandlergreout
+ },
+ { EOH }
+};
+static int
+mod_handler(module_t mod, int type, void *data)
+{
+ int error;
+
+ switch (type) {
+ case MOD_LOAD:
+ error = 0;
+ LibAliasAttachHandlers(handlers);
+ break;
+ case MOD_UNLOAD:
+ error = 0;
+ LibAliasDetachHandlers(handlers);
+ break;
+ default:
+ error = EINVAL;
+ }
+ return (error);
+}
+
+#ifdef _KERNEL
+static
+#endif
+moduledata_t alias_mod = {
+ "alias_pptp", mod_handler, NULL
+};
+
+#ifdef _KERNEL
+DECLARE_MODULE(alias_pptp, alias_mod, SI_SUB_DRIVERS, SI_ORDER_SECOND);
+MODULE_VERSION(alias_pptp, 1);
+MODULE_DEPEND(alias_pptp, libalias, 1, 1, 1);
+#endif
/* Includes */
#ifdef _KERNEL
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_proxy.c#8 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_proxy.c,v 1.26 2005/06/27 07:36:02 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_proxy.c,v 1.27 2006/09/26 23:26:53 piso Exp $");
/* file: alias_proxy.c
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_skinny.c#11 (text+ko) ====
@@ -27,7 +27,7 @@
*
* Author: Joe Marcus Clarke <marcus at FreeBSD.org>
*
- * $FreeBSD: src/sys/netinet/libalias/alias_skinny.c,v 1.12 2005/06/27 07:36:02 glebius Exp $
+ * $FreeBSD: src/sys/netinet/libalias/alias_skinny.c,v 1.13 2006/09/26 23:26:53 piso Exp $
*/
#ifdef _KERNEL
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_smedia.c#13 (text+ko) ====
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_smedia.c,v 1.15 2005/06/27 07:36:02 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_smedia.c,v 1.16 2006/09/26 23:26:53 piso Exp $");
/*
Alias_smedia.c is meant to contain the aliasing code for streaming media
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_util.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_util.c,v 1.18 2005/06/27 07:36:02 glebius Exp $");
+__FBSDID("$FreeBSD: src/sys/netinet/libalias/alias_util.c,v 1.19 2006/09/26 23:26:53 piso Exp $");
/*
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/libalias.3#7 (text+ko) ====
@@ -23,7 +23,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $FreeBSD: src/sys/netinet/libalias/libalias.3,v 1.55 2006/07/04 20:39:38 maxim Exp $
+.\" $FreeBSD: src/sys/netinet/libalias/libalias.3,v 1.56 2006/09/26 23:26:53 piso Exp $
.\"
.Dd July 04, 2006
.Dt LIBALIAS 3
==== //depot/projects/soc2005/libalias/sys/pci/agp_i810.c#3 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/pci/agp_i810.c,v 1.38 2006/06/27 14:05:11 anholt Exp $");
+__FBSDID("$FreeBSD: src/sys/pci/agp_i810.c,v 1.39 2006/09/27 06:38:54 anholt Exp $");
#include "opt_bus.h"
@@ -89,6 +89,8 @@
bus_space_tag_t gtt_bst; /* bus_space tag */
bus_space_handle_t gtt_bsh; /* bus_space handle */
+ struct resource *gm; /* unmapped (but allocated) aperture */
+
void *argb_cursor; /* contigmalloc area for ARGB cursor */
};
@@ -121,15 +123,10 @@
"Intel 82915G (915G GMCH) SVGA controller"},
{0x25928086, CHIP_I915, 0x00020000,
"Intel 82915GM (915GM GMCH) SVGA controller"},
- /* XXX: I believe these chipsets should work, but they haven't been
- * tested yet.
- */
- /*
{0x27728086, CHIP_I915, 0x00020000,
"Intel 82945G (945G GMCH) SVGA controller"},
{0x27A28086, CHIP_I915, 0x00020000,
"Intel 82945GM (945GM GMCH) SVGA controller"},
- */
{0, 0, 0, NULL}
};
@@ -317,12 +314,30 @@
RF_ACTIVE);
if (!sc->gtt) {
bus_release_resource(dev, SYS_RES_MEMORY,
- AGP_I810_MMADR, sc->regs);
+ AGP_I915_MMADR, sc->regs);
agp_generic_detach(dev);
return ENODEV;
}
sc->gtt_bst = rman_get_bustag(sc->gtt);
sc->gtt_bsh = rman_get_bushandle(sc->gtt);
+
+ /* While agp_generic_attach allocates the AGP_APBASE resource
+ * to try to reserve the aperture, on the 915 the aperture
+ * isn't in PCIR_BAR(0), it's in PCIR_BAR(2), so it allocated
+ * the registers that we just mapped anyway. So, allocate the
+ * aperture here, which also gives us easy access to it for the
+ * agp_i810_get_aperture().
+ */
+ rid = AGP_I915_GMADR;
+ sc->gm = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, 0);
+ if (sc->gm == NULL) {
+ bus_release_resource(dev, SYS_RES_MEMORY,
+ AGP_I915_MMADR, sc->regs);
+ bus_release_resource(dev, SYS_RES_MEMORY,
+ AGP_I915_GTTADR, sc->regs);
+ agp_generic_detach(dev);
+ return ENODEV;
+ }
}
sc->initial_aperture = AGP_GET_APERTURE(dev);
@@ -475,6 +490,8 @@
free(sc->gatt, M_AGP);
if (sc->chiptype == CHIP_I915) {
+ bus_release_resource(dev, SYS_RES_MEMORY, AGP_I915_GMADR,
+ sc->gm);
bus_release_resource(dev, SYS_RES_MEMORY, AGP_I915_GTTADR,
sc->gtt);
bus_release_resource(dev, SYS_RES_MEMORY, AGP_I915_MMADR,
@@ -510,13 +527,12 @@
case CHIP_I855:
return 128 * 1024 * 1024;
case CHIP_I915:
- temp = pci_read_config(dev, AGP_I915_MSAC, 1);
- if ((temp & AGP_I915_MSAC_GMASIZE) ==
- AGP_I915_MSAC_GMASIZE_128) {
- return 128 * 1024 * 1024;
- } else {
- return 256 * 1024 * 1024;
- }
+ /* The documentation states that AGP_I915_MSAC should have bit
+ * 1 set if the aperture is 128MB instead of 256. However,
+ * that bit appears to not get set, so we instead use the
+ * aperture resource size, which should always be correct.
+ */
+ return rman_get_size(sc->gm);
}
return 0;
==== //depot/projects/soc2005/libalias/usr.bin/id/id.1#3 (text+ko) ====
@@ -33,9 +33,9 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)id.1 8.1 (Berkeley) 6/6/93
-.\" $FreeBSD: src/usr.bin/id/id.1,v 1.17 2006/09/23 15:43:29 rwatson Exp $
+.\" $FreeBSD: src/usr.bin/id/id.1,v 1.18 2006/09/26 22:28:12 ceri Exp $
.\"
-.Dd May 3, 2004
+.Dd September 26, 2006
.Dt ID 1
.Os
.Sh NAME
@@ -89,6 +89,10 @@
Display the MAC label of the current process.
.It Fl P
Display the id as a password file entry.
+.It Fl a
+Ignored for compatibility with other
+.Nm
+implementations.
.It Fl g
Display the effective group ID as a number.
.It Fl n
==== //depot/projects/soc2005/libalias/usr.bin/id/id.c#3 (text+ko) ====
@@ -43,7 +43,7 @@
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/usr.bin/id/id.c,v 1.30 2006/09/26 05:46:55 ru Exp $");
+__FBSDID("$FreeBSD: src/usr.bin/id/id.c,v 1.31 2006/09/26 22:28:12 ceri Exp $");
#include <sys/param.h>
#include <sys/mac.h>
@@ -96,7 +96,7 @@
}
while ((ch = getopt(argc, argv,
- (isgroups || iswhoami) ? "" : "APGMgnpru")) != -1)
+ (isgroups || iswhoami) ? "" : "APGMagnpru")) != -1)
switch(ch) {
#ifdef USE_BSM_AUDIT
case 'A':
@@ -112,6 +112,8 @@
case 'P':
Pflag = 1;
break;
+ case 'a':
+ break;
case 'g':
gflag = 1;
break;
==== //depot/projects/soc2005/libalias/usr.sbin/vidcontrol/vidcontrol.c#2 (text+ko) ====
@@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] =
- "$FreeBSD: src/usr.sbin/vidcontrol/vidcontrol.c,v 1.53 2005/09/17 12:52:04 rodrigc Exp $";
+ "$FreeBSD: src/usr.sbin/vidcontrol/vidcontrol.c,v 1.54 2006/09/26 21:46:12 ru Exp $";
#endif /* not lint */
#include <ctype.h>
@@ -147,7 +147,7 @@
{
int size[3];
- ioctl(0, VT_ACTIVATE, (caddr_t) (long) cur_info.active_vty);
+ ioctl(0, VT_ACTIVATE, cur_info.active_vty);
fprintf(stderr, "\033[=%dA", cur_info.console_info.mv_ovscan);
fprintf(stderr, "\033[=%dF", cur_info.console_info.mv_norm.fore);
@@ -785,7 +785,7 @@
if (n < 1 || n > 16) {
revert();
errx(1, "console number out of range");
- } else if (ioctl(0, VT_ACTIVATE, (caddr_t) (long) n) == -1) {
+ } else if (ioctl(0, VT_ACTIVATE, n) == -1) {
revert();
errc(1, errno, "switching vty");
}
More information about the p4-projects
mailing list