From 1f876171067c04fc21fccd5a3051f982fd85c0f0 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 21 Oct 2009 19:07:36 +0000 Subject: Updated to xorg-server-1.7.99.1 --- xorg-server/hw/kdrive/linux/Makefile.am | 1 - xorg-server/hw/kdrive/linux/Makefile.in | 20 ++---- xorg-server/hw/kdrive/linux/bus.c | 6 +- xorg-server/hw/kdrive/linux/klinux.h | 32 ---------- xorg-server/hw/kdrive/linux/linux.c | 105 -------------------------------- xorg-server/hw/kdrive/linux/tslib.c | 4 -- 6 files changed, 9 insertions(+), 159 deletions(-) delete mode 100644 xorg-server/hw/kdrive/linux/klinux.h (limited to 'xorg-server/hw/kdrive/linux') diff --git a/xorg-server/hw/kdrive/linux/Makefile.am b/xorg-server/hw/kdrive/linux/Makefile.am index be07561ef..13df142f7 100644 --- a/xorg-server/hw/kdrive/linux/Makefile.am +++ b/xorg-server/hw/kdrive/linux/Makefile.am @@ -17,7 +17,6 @@ KDRIVE_HW_SOURCES = \ liblinux_la_SOURCES = \ bus.c \ - klinux.h \ mouse.c \ ms.c \ ps2.c \ diff --git a/xorg-server/hw/kdrive/linux/Makefile.in b/xorg-server/hw/kdrive/linux/Makefile.in index 87e6503c5..a5b0791d7 100644 --- a/xorg-server/hw/kdrive/linux/Makefile.in +++ b/xorg-server/hw/kdrive/linux/Makefile.in @@ -41,7 +41,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ - $(top_srcdir)/m4/shave.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d @@ -57,8 +57,8 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) liblinux_la_LIBADD = -am__liblinux_la_SOURCES_DIST = bus.c klinux.h mouse.c ms.c ps2.c \ - evdev.c keyboard.c linux.c tslib.c +am__liblinux_la_SOURCES_DIST = bus.c mouse.c ms.c ps2.c evdev.c \ + keyboard.c linux.c tslib.c am__objects_1 = evdev.lo keyboard.lo linux.lo @TSLIB_TRUE@am__objects_2 = tslib.lo am_liblinux_la_OBJECTS = bus.lo mouse.lo ms.lo ps2.lo $(am__objects_1) \ @@ -100,7 +100,6 @@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ -AM_MAKEFLAGS = @AM_MAKEFLAGS@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ @@ -125,7 +124,6 @@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CWARNFLAGS = @CWARNFLAGS@ -CXX = @CXX@ CYGPATH_W = @CYGPATH_W@ DARWIN_LIBS = @DARWIN_LIBS@ DBUS_CFLAGS = @DBUS_CFLAGS@ @@ -149,6 +147,7 @@ DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_LIBS@ DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -166,8 +165,6 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FC = @FC@ FGREP = @FGREP@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ @@ -213,7 +210,6 @@ LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAIN_LIB = @MAIN_LIB@ -MAKEFLAGS = @MAKEFLAGS@ MAKEINFO = @MAKEINFO@ MAKE_HTML = @MAKE_HTML@ MAKE_PDF = @MAKE_PDF@ @@ -239,6 +235,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ @@ -248,7 +245,6 @@ PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PROJECTROOT = @PROJECTROOT@ PS2PDF = @PS2PDF@ -Q = @Q@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ @@ -262,7 +258,6 @@ STRIP = @STRIP@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ -V = @V@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDRES = @WINDRES@ @@ -304,8 +299,6 @@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ -XSDL_INCS = @XSDL_INCS@ -XSDL_LIBS = @XSDL_LIBS@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ @@ -348,6 +341,7 @@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ @@ -379,7 +373,6 @@ psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ -shavedir = @shavedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ @@ -401,7 +394,6 @@ KDRIVE_HW_SOURCES = \ liblinux_la_SOURCES = \ bus.c \ - klinux.h \ mouse.c \ ms.c \ ps2.c \ diff --git a/xorg-server/hw/kdrive/linux/bus.c b/xorg-server/hw/kdrive/linux/bus.c index ba8a6cd43..93c3ea5f3 100644 --- a/xorg-server/hw/kdrive/linux/bus.c +++ b/xorg-server/hw/kdrive/linux/bus.c @@ -72,7 +72,7 @@ BusInit (KdPointerInfo *pi) { for (i = 0; i < NUM_BUS_NAMES; i++) { - if ((fd = open (BusNames[i], 0)) > 0) + if ((fd = open (BusNames[i], 0)) >= 0) { close(fd); if (pi->path) @@ -84,7 +84,7 @@ BusInit (KdPointerInfo *pi) } else { - if ((fd = open(pi->path, 0)) > 0) + if ((fd = open(pi->path, 0)) >= 0) { close(fd); return Success; @@ -99,7 +99,7 @@ BusEnable (KdPointerInfo *pi) { int fd = open(pi->path, 0); - if (fd > 0) + if (fd >= 0) { KdRegisterFd(fd, BusRead, pi); pi->driverPrivate = (void *)fd; diff --git a/xorg-server/hw/kdrive/linux/klinux.h b/xorg-server/hw/kdrive/linux/klinux.h deleted file mode 100644 index 349685241..000000000 --- a/xorg-server/hw/kdrive/linux/klinux.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright © 2003 Keith Packard - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _KLINUX_H_ -#define _KLINUX_H_ - -Bool -LinuxFindPci (CARD16 vendor, CARD16 device, CARD32 count, KdCardAttr *attr); - -unsigned char * -LinuxGetPciCfg(KdCardAttr *attr); - -#endif /* _KLINUX_H_ */ diff --git a/xorg-server/hw/kdrive/linux/linux.c b/xorg-server/hw/kdrive/linux/linux.c index 3fba056df..f76c2cbd9 100644 --- a/xorg-server/hw/kdrive/linux/linux.c +++ b/xorg-server/hw/kdrive/linux/linux.c @@ -24,7 +24,6 @@ #include #endif #include "kdrive.h" -#include "klinux.h" #include #include #include @@ -125,110 +124,6 @@ LinuxInit (void) return 1; } -Bool -LinuxFindPci (CARD16 vendor, CARD16 device, CARD32 count, KdCardAttr *attr) -{ - FILE *f; - char line[2048], *l, *end; - CARD32 bus, id, addr; - int n; - CARD32 ven_dev; - Bool ret = FALSE; - int i; - - attr->vendorID = vendor; - attr->deviceID = device; - ven_dev = (((CARD32) vendor) << 16) | ((CARD32) device); - f = fopen ("/proc/bus/pci/devices", "r"); - if (!f) - return FALSE; - attr->io = 0; - while (fgets (line, sizeof (line)-1, f)) - { - line[sizeof(line)-1] = '\0'; - l = line; - bus = strtoul (l, &end, 16); - if (end == l) - continue; - l = end; - id = strtoul (l, &end, 16); - if (end == l) - continue; - l = end; - if (id != ven_dev) - continue; - if (count--) - continue; - (void) strtoul (l, &end, 16); /* IRQ */ - if (end == l) - continue; - l = end; - n = 0; - for (i = 0; i < 6; i++) - { - addr = strtoul (l, &end, 16); - if (end == l) - break; - if (addr & 1) - attr->io = addr & ~0xf; - else - { - if (n == KD_MAX_CARD_ADDRESS) - break; - attr->address[n++] = addr & ~0xf; - } - l = end; - } - while (n > 0) - { - if (attr->address[n-1] != 0) - break; - n--; - } - attr->naddr = n; - attr->domain = 0; /* XXX */ - attr->bus = (bus >> 8) & 0xff; - attr->slot = (bus >> 3) & 0x1f; - attr->func = bus & 0x07; - ret = TRUE; - break; - } - fclose (f); - return ret; -} - -unsigned char * -LinuxGetPciCfg(KdCardAttr *attr) -{ - char filename[256]; - FILE *f; - unsigned char *cfg; - int r; - - snprintf(filename, 255, "/proc/bus/pci/%02x/%02x.%x", - attr->bus >> 8, (attr->bus & 0xff) >> 3, attr->bus & 7); -/* fprintf(stderr,"Find card on path %s\n",filename); */ - - if (!(f=fopen(filename,"r"))) - return NULL; - - if (!(cfg=xalloc(256))) - { - fclose(f); - return NULL; - } - - if (256 != (r=fread(cfg, 1, 256, f))) - { - fprintf(stderr,"LinuxGetPciCfg: read %d, expected 256\n",r); - free(cfg); - cfg=NULL; - } - fclose(f); -/* fprintf(stderr,"LinuxGetPciCfg: success, returning %p\n",cfg); */ - return cfg; -} - static void LinuxSetSwitchMode (int mode) { diff --git a/xorg-server/hw/kdrive/linux/tslib.c b/xorg-server/hw/kdrive/linux/tslib.c index 59011b0e3..7cc23e637 100644 --- a/xorg-server/hw/kdrive/linux/tslib.c +++ b/xorg-server/hw/kdrive/linux/tslib.c @@ -151,10 +151,6 @@ TslibDisable (KdPointerInfo *pi) static Status TslibInit (KdPointerInfo *pi) { - int fd = 0, i = 0; - DIR *inputdir = NULL; - struct dirent *inputent = NULL; - struct tsdev *tsDev = NULL; struct TslibPrivate *private = NULL; if (!pi || !pi->dixdev) -- cgit v1.2.3