xserver: Branch 'master' - 7 commits
Matthieu Herrb
herrb at kemper.freedesktop.org
Thu Jun 19 08:02:38 PDT 2008
configure.ac | 2 ++
hw/xfree86/common/xf86Config.c | 5 +++--
hw/xfree86/modes/xf86Rotate.c | 16 ++++++++++------
hw/xfree86/os-support/bsd/bsd_axp.c | 2 +-
hw/xfree86/os-support/bsd/bsd_init.c | 19 ++++++++++++-------
hw/xfree86/os-support/shared/sigio.c | 3 +++
hw/xfree86/utils/kbd_mode/Makefile.am | 1 -
os/access.c | 3 ++-
8 files changed, 33 insertions(+), 18 deletions(-)
New commits:
commit 155fcecb320dbcfb899d6bcd78048ce0993bf28b
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Mon May 19 08:09:33 2008 +0200
Various messages clean-ups.
diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c
index 83583d5..cbb9e48 100644
--- a/hw/xfree86/os-support/bsd/bsd_init.c
+++ b/hw/xfree86/os-support/bsd/bsd_init.c
@@ -310,8 +310,7 @@ acquire_vt:
#endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */
#ifdef WSCONS_SUPPORT
case WSCONS:
- fprintf(stderr, "xf86OpenConsole\n");
- /* xf86Info.consoleFd = open("/dev/wskbd0", 0); */
+ /* Nothing to do */
break;
#endif
}
@@ -575,8 +574,14 @@ xf86OpenPcvt()
sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0)
{
- FatalError("xf86OpenPcvt: Cannot open %s (%s)",
+ ErrorF("xf86OpenPcvt: Cannot open %s (%s)",
vtname, strerror(errno));
+ xf86Info.vtno = initialVT;
+ sprintf(vtname, "%s%01x", vtprefix, xf86Info.vtno - 1);
+ if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0) {
+ FatalError("xf86OpenPcvt: Cannot open %s (%s)",
+ vtname, strerror(errno));
+ }
}
if (ioctl(fd, VT_GETMODE, &vtmode) < 0)
{
@@ -585,8 +590,8 @@ xf86OpenPcvt()
xf86Info.consType = PCVT;
#ifdef WSCONS_SUPPORT
xf86Msg(X_PROBED,
- "Using wscons driver in pcvt compatibility mode "
- "(version %d.%d)\n",
+ "Using wscons driver on %s in pcvt compatibility mode "
+ "(version %d.%d)\n", vtname,
pcvt_version.rmajor, pcvt_version.rminor);
#else
xf86Msg(X_PROBED, "Using pcvt driver (version %d.%d)\n",
@@ -620,7 +625,7 @@ xf86OpenWScons()
#if defined(__NetBSD__)
sprintf(ttyname, "/dev/ttyE%d", i);
#elif defined(__OpenBSD__)
- sprintf(ttyname, "/dev/ttyC%d", i);
+ sprintf(ttyname, "/dev/ttyC%x", i);
#endif
if ((fd = open(ttyname, 2)) != -1)
break;
@@ -662,7 +667,7 @@ xf86CloseConsole()
VT.mode = VT_AUTO;
ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* dflt vt handling */
}
-#if !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
+#if !defined(OpenBSD) && !defined(USE_DEV_IO) && !defined(USE_I386_IOPL)
if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0)
{
xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)",
commit 41a65e110409a290288180e8e1517f053f877586
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Mon May 19 06:12:04 2008 +0200
Fix ipc check on OpenBSD
diff --git a/configure.ac b/configure.ac
index fec18ca..f6997e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -262,6 +262,8 @@ AM_CONDITIONAL(FREEBSD_KLDLOAD, [test "x$ac_cv_sys_linker_h" = xyes])
AC_CACHE_CHECK([for SYSV IPC],
ac_cv_sysv_ipc,
[AC_TRY_LINK([
+#include <sys/types.h>
+#include <sys/ipc.h>
#include <sys/shm.h>
],[
{
commit ce4d4b3c1b0e25f64d6f781b09528b2f3ae33207
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Mon May 19 05:19:01 2008 +0200
build fix
diff --git a/hw/xfree86/os-support/bsd/bsd_axp.c b/hw/xfree86/os-support/bsd/bsd_axp.c
index 51ffef1..cb10a9d 100644
--- a/hw/xfree86/os-support/bsd/bsd_axp.c
+++ b/hw/xfree86/os-support/bsd/bsd_axp.c
@@ -7,7 +7,7 @@
#include "os.h"
#include "xf86.h"
#include "xf86Priv.h"
-#include "xf86Axp.h"
+#include "shared/xf86Axp.h"
#include <sys/param.h>
#include "xf86_OSlib.h"
#include <stdio.h>
commit 19c7e9da55646f1f6e05c28cd71865cd8d84e1ff
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Mon May 19 02:24:17 2008 +0200
preserve errno around the SIGIO handler
diff --git a/hw/xfree86/os-support/shared/sigio.c b/hw/xfree86/os-support/shared/sigio.c
index c97f503..f51131c 100644
--- a/hw/xfree86/os-support/shared/sigio.c
+++ b/hw/xfree86/os-support/shared/sigio.c
@@ -101,6 +101,7 @@ xf86SIGIO (int sig)
int i;
fd_set ready;
struct timeval to;
+ int save_errno = errno; /* do not clobber the global errno */
int r;
ready = xf86SigIOMask;
@@ -117,6 +118,8 @@ xf86SIGIO (int sig)
if (r > 0) {
xf86Msg(X_ERROR, "SIGIO %d descriptors not handled\n", r);
}
+ /* restore global errno */
+ errno = save_errno;
}
static int
commit 0a81d476388c51f8aa723400dffc375e112ea97a
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Mon May 19 02:20:44 2008 +0200
Remove RCS Id.
diff --git a/hw/xfree86/utils/kbd_mode/Makefile.am b/hw/xfree86/utils/kbd_mode/Makefile.am
index 1b28411..087caa2 100644
--- a/hw/xfree86/utils/kbd_mode/Makefile.am
+++ b/hw/xfree86/utils/kbd_mode/Makefile.am
@@ -1,4 +1,3 @@
-# $Id$
#
# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
#
commit c0d7ad9c88172d753b932069743ae65f75de3aa9
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Thu Jun 19 16:51:18 2008 +0200
Let code build with gcc 2.95
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index eb084a5..e52974d 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -599,8 +599,9 @@ configFiles(XF86ConfFilesPtr fileconf)
pathFrom = X_CONFIG;
if (*f) {
if (xf86Info.useDefaultFontPath) {
+ char *g;
xf86Msg(X_DEFAULT, "Including the default font path %s.\n", defaultFontPath);
- char *g = xnfalloc(strlen(defaultFontPath) + strlen(f) + 3);
+ g = xnfalloc(strlen(defaultFontPath) + strlen(f) + 3);
strcpy(g, f);
strcat(g, ",");
defaultFontPath = strcat(g, defaultFontPath);
@@ -1233,8 +1234,8 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout)
* remove the core attribute from the later ones.
*/
for (devs = servlayoutp->inputs; devs && *devs; devs++) {
- indp = *devs;
pointer opt1 = NULL, opt2 = NULL;
+ indp = *devs;
if (indp->commonOptions &&
xf86CheckBoolOption(indp->commonOptions, "CorePointer", FALSE)) {
opt1 = indp->commonOptions;
diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c
index 8f34032..6c93066 100644
--- a/hw/xfree86/modes/xf86Rotate.c
+++ b/hw/xfree86/modes/xf86Rotate.c
@@ -597,6 +597,10 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
}
else
{
+ int width, height, old_width, old_height;
+ void *shadowData;
+ PixmapPtr shadow;
+
PictureTransformTranslate (&crtc_to_fb, &fb_to_crtc, F(crtc->x), F(crtc->y));
PictureTransformIsInverse ("offset", &crtc_to_fb, &fb_to_crtc);
@@ -605,12 +609,12 @@ xf86CrtcRotate (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation)
* matches the mode, not the pre-rotated copy in the
* frame buffer
*/
- int width = mode->HDisplay;
- int height = mode->VDisplay;
- void *shadowData = crtc->rotatedData;
- PixmapPtr shadow = crtc->rotatedPixmap;
- int old_width = shadow ? shadow->drawable.width : 0;
- int old_height = shadow ? shadow->drawable.height : 0;
+ width = mode->HDisplay;
+ height = mode->VDisplay;
+ shadowData = crtc->rotatedData;
+ shadow = crtc->rotatedPixmap;
+ old_width = shadow ? shadow->drawable.width : 0;
+ old_height = shadow ? shadow->drawable.height : 0;
/* Allocate memory for rotation */
if (old_width != width || old_height != height)
commit 219dd2d44a9da40427ad48b0f09b981fe0551f4b
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Sun May 18 13:53:32 2008 +0200
sprintf() -> snprintf()
diff --git a/os/access.c b/os/access.c
index db14380..6b55afd 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1190,7 +1190,8 @@ ResetHosts (char *display)
strlen(display) + 1;
if (fnamelen > sizeof(fname))
FatalError("Display name `%s' is too long\n", display);
- sprintf(fname, ETC_HOST_PREFIX "%s" ETC_HOST_SUFFIX, display);
+ snprintf(fname, sizeof(fname), ETC_HOST_PREFIX "%s" ETC_HOST_SUFFIX,
+ display);
if ((fd = fopen (fname, "r")) != 0)
{
More information about the xorg-commit
mailing list