- adjusted moblin-xserver-no-root-2.patch, renamed it to
xorg-server-nohwaccess.diff and enable it by default - rename moblin-xorg-x11-nonroot-vesa.patch to xorg-x11-nonroot-vesa.patch - removed obsolete patch 'xserver-boottime.patch' OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=249
This commit is contained in:
parent
322e7845aa
commit
6e8df4f3f4
@ -1,105 +0,0 @@
|
||||
Index: xorg-server-1.6.3/hw/xfree86/os-support/linux/lnx_init.c
|
||||
===================================================================
|
||||
--- xorg-server-1.6.3.orig/hw/xfree86/os-support/linux/lnx_init.c
|
||||
+++ xorg-server-1.6.3/hw/xfree86/os-support/linux/lnx_init.c
|
||||
@@ -49,6 +49,7 @@ static Bool KeepTty = FALSE;
|
||||
static int VTnum = -1;
|
||||
static Bool VTSwitch = TRUE;
|
||||
static Bool ShareVTs = FALSE;
|
||||
+Bool NoHwAccess = FALSE;
|
||||
static int activeVT = -1;
|
||||
|
||||
static int vtPermSave[4];
|
||||
@@ -80,9 +81,11 @@ saveVtPerms(void)
|
||||
static void
|
||||
restoreVtPerms(void)
|
||||
{
|
||||
- /* Set the terminal permissions back to before we started. */
|
||||
- chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
|
||||
- chown(vtname, vtPermSave[2], vtPermSave[3]);
|
||||
+ if (geteuid() == 0) {
|
||||
+ /* Set the terminal permissions back to before we started. */
|
||||
+ (void)chown("/dev/tty0", vtPermSave[0], vtPermSave[1]);
|
||||
+ (void)chown(vtname, vtPermSave[2], vtPermSave[3]);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void *console_handler;
|
||||
@@ -210,20 +213,22 @@ xf86OpenConsole(void)
|
||||
xf86Msg(X_WARNING,
|
||||
"xf86OpenConsole: Could not save ownership of VT\n");
|
||||
|
||||
- /* change ownership of the vt */
|
||||
- if (chown(vtname, getuid(), getgid()) < 0)
|
||||
- xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n",
|
||||
- vtname, strerror(errno));
|
||||
-
|
||||
- /*
|
||||
- * the current VT device we're running on is not "console", we want
|
||||
- * to grab all consoles too
|
||||
- *
|
||||
- * Why is this needed??
|
||||
- */
|
||||
- if (chown("/dev/tty0", getuid(), getgid()) < 0)
|
||||
- xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n",
|
||||
- strerror(errno));
|
||||
+ if (geteuid() == 0) {
|
||||
+ /* change ownership of the vt */
|
||||
+ if (chown(vtname, getuid(), getgid()) < 0)
|
||||
+ xf86Msg(X_WARNING,"xf86OpenConsole: chown %s failed: %s\n",
|
||||
+ vtname, strerror(errno));
|
||||
+
|
||||
+ /*
|
||||
+ * the current VT device we're running on is not
|
||||
+ * "console", we want to grab all consoles too
|
||||
+ *
|
||||
+ * Why is this needed??
|
||||
+ */
|
||||
+ if (chown("/dev/tty0", getuid(), getgid()) < 0)
|
||||
+ xf86Msg(X_WARNING,"xf86OpenConsole: chown /dev/tty0 failed: %s\n",
|
||||
+ strerror(errno));
|
||||
+ }
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -434,6 +439,11 @@ xf86ProcessArgument(int argc, char *argv
|
||||
ShareVTs = TRUE;
|
||||
return(1);
|
||||
}
|
||||
+ if (!strcmp(argv[i], "-nohwaccess"))
|
||||
+ {
|
||||
+ NoHwAccess = TRUE;
|
||||
+ return(1);
|
||||
+ }
|
||||
if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
|
||||
{
|
||||
if (sscanf(argv[i], "vt%2d", &VTnum) == 0)
|
||||
@@ -455,5 +465,6 @@ xf86UseMsg()
|
||||
ErrorF("don't detach controlling tty (for debugging only)\n");
|
||||
ErrorF("-novtswitch don't immediately switch to new VT\n");
|
||||
ErrorF("-sharevts share VTs with another X server\n");
|
||||
+ ErrorF("-nohwaccess don't access hardware ports directly\n");
|
||||
return;
|
||||
}
|
||||
Index: xorg-server-1.6.3/hw/xfree86/os-support/linux/lnx_video.c
|
||||
===================================================================
|
||||
--- xorg-server-1.6.3.orig/hw/xfree86/os-support/linux/lnx_video.c
|
||||
+++ xorg-server-1.6.3/hw/xfree86/os-support/linux/lnx_video.c
|
||||
@@ -51,6 +51,7 @@
|
||||
#define MAP_FAILED ((void *)-1)
|
||||
#endif
|
||||
|
||||
+extern Bool NoHwAccess;
|
||||
static Bool ExtendedEnabled = FALSE;
|
||||
|
||||
#ifdef __ia64__
|
||||
@@ -509,6 +510,9 @@ xf86EnableIO(void)
|
||||
int fd;
|
||||
unsigned int ioBase_phys;
|
||||
#endif
|
||||
+ /* Fake it... */
|
||||
+ if (NoHwAccess)
|
||||
+ return TRUE;
|
||||
|
||||
if (ExtendedEnabled)
|
||||
return TRUE;
|
52
xorg-server-nohwaccess.diff
Normal file
52
xorg-server-nohwaccess.diff
Normal file
@ -0,0 +1,52 @@
|
||||
Index: xorg-server-1.6.3/hw/xfree86/os-support/linux/lnx_init.c
|
||||
===================================================================
|
||||
--- xorg-server-1.6.3.orig/hw/xfree86/os-support/linux/lnx_init.c
|
||||
+++ xorg-server-1.6.3/hw/xfree86/os-support/linux/lnx_init.c
|
||||
@@ -49,6 +49,7 @@ static Bool KeepTty = FALSE;
|
||||
static int VTnum = -1;
|
||||
static Bool VTSwitch = TRUE;
|
||||
static Bool ShareVTs = FALSE;
|
||||
+Bool NoHwAccess = FALSE;
|
||||
static int activeVT = -1;
|
||||
|
||||
static int vtPermSave[4];
|
||||
@@ -434,6 +439,11 @@ xf86ProcessArgument(int argc, char *argv
|
||||
ShareVTs = TRUE;
|
||||
return(1);
|
||||
}
|
||||
+ if (!strcmp(argv[i], "-nohwaccess"))
|
||||
+ {
|
||||
+ NoHwAccess = TRUE;
|
||||
+ return(1);
|
||||
+ }
|
||||
if ((argv[i][0] == 'v') && (argv[i][1] == 't'))
|
||||
{
|
||||
if (sscanf(argv[i], "vt%2d", &VTnum) == 0)
|
||||
@@ -455,4 +465,5 @@ xf86UseMsg()
|
||||
ErrorF("don't detach controlling tty (for debugging only)\n");
|
||||
ErrorF("-novtswitch don't immediately switch to new VT\n");
|
||||
ErrorF("-sharevts share VTs with another X server\n");
|
||||
+ ErrorF("-nohwaccess don't access hardware ports directly\n");
|
||||
}
|
||||
Index: xorg-server-1.6.3/hw/xfree86/os-support/linux/lnx_video.c
|
||||
===================================================================
|
||||
--- xorg-server-1.6.3.orig/hw/xfree86/os-support/linux/lnx_video.c
|
||||
+++ xorg-server-1.6.3/hw/xfree86/os-support/linux/lnx_video.c
|
||||
@@ -51,6 +51,7 @@
|
||||
#define MAP_FAILED ((void *)-1)
|
||||
#endif
|
||||
|
||||
+extern Bool NoHwAccess;
|
||||
static Bool ExtendedEnabled = FALSE;
|
||||
|
||||
#ifdef __ia64__
|
||||
@@ -509,6 +510,9 @@ xf86EnableIO(void)
|
||||
int fd;
|
||||
unsigned int ioBase_phys;
|
||||
#endif
|
||||
+ /* Fake it... */
|
||||
+ if (NoHwAccess)
|
||||
+ return TRUE;
|
||||
|
||||
if (ExtendedEnabled)
|
||||
return TRUE;
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 10 12:26:46 CEST 2010 - sndirsch@suse.de
|
||||
|
||||
- adjusted moblin-xserver-no-root-2.patch, renamed it to
|
||||
xorg-server-nohwaccess.diff and enable it by default
|
||||
- rename moblin-xorg-x11-nonroot-vesa.patch to
|
||||
xorg-x11-nonroot-vesa.patch
|
||||
- removed obsolete patch 'xserver-boottime.patch'
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 8 13:42:43 UTC 2010 - eich@novell.com
|
||||
|
||||
|
@ -107,18 +107,11 @@ Patch132: fixed-SYNC-extension-trigger-BlockHandler-test.diff
|
||||
Patch143: autoconfig_fallback_fbdev_first.diff
|
||||
Patch145: driver-autoconfig.diff
|
||||
Patch147: xserver-1.6.1-nouveau.patch
|
||||
# Moblin
|
||||
Patch162: cache-xkbcomp-output-for-fast-start-up.patch
|
||||
Patch163: xserver-bg-none-root.patch
|
||||
Patch164: xorg-detect-psb.patch
|
||||
%if %moblin
|
||||
Patch168: moblin-xserver-no-root-2.patch
|
||||
%endif
|
||||
Patch169: moblin-xorg-x11-nonroot-vesa.patch
|
||||
%if %moblin
|
||||
Patch170: xserver-boottime.patch
|
||||
Patch171: moblin-use_preferred_mode_for_all_outputs.diff
|
||||
%endif
|
||||
Patch168: xorg-server-nohwaccess.diff
|
||||
Patch169: xorg-x11-nonroot-vesa.patch
|
||||
Patch200: bug534768-prefer_local_symbols.patch
|
||||
Patch202: 0001-Check-harder-for-primary-PCI-device.patch
|
||||
Patch203: 0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch
|
||||
@ -129,6 +122,9 @@ Patch207: xorg-server-option_libxf86config.diff
|
||||
Patch208: xorg-evdev-conf.diff
|
||||
Patch209: sw_cursor_on_randr.patch
|
||||
Patch210: pio_ia64.diff
|
||||
%if %moblin
|
||||
Patch300: moblin-use_preferred_mode_for_all_outputs.diff
|
||||
%endif
|
||||
|
||||
%description
|
||||
This package contains the X.Org Server.
|
||||
@ -236,15 +232,8 @@ popd
|
||||
%patch162 -p1
|
||||
%patch163 -p1
|
||||
%patch164 -p1
|
||||
%if %moblin
|
||||
%patch168 -p1
|
||||
%endif
|
||||
%patch169 -p1
|
||||
%if %moblin
|
||||
%patch170 -p1
|
||||
%patch171 -p1
|
||||
%endif
|
||||
#
|
||||
%patch200 -p1
|
||||
%patch202 -p1
|
||||
%patch203 -p1
|
||||
@ -255,6 +244,9 @@ popd
|
||||
%patch208 -p0
|
||||
%patch209 -p1
|
||||
%patch210 -p1
|
||||
%if %moblin
|
||||
%patch300 -p1
|
||||
%endif
|
||||
|
||||
%build
|
||||
pushd xorg-docs-*
|
||||
|
@ -1,38 +0,0 @@
|
||||
Index: xorg-server-1.6.3/os/log.c
|
||||
===================================================================
|
||||
--- xorg-server-1.6.3.orig/os/log.c
|
||||
+++ xorg-server-1.6.3/os/log.c
|
||||
@@ -255,6 +255,33 @@ LogVWrite(int verb, const char *f, va_li
|
||||
static char tmpBuffer[1024];
|
||||
int len = 0;
|
||||
|
||||
+ struct timeval time;
|
||||
+ time_t tv_sec;
|
||||
+ suseconds_t tv_usec;
|
||||
+ static Bool first = TRUE;
|
||||
+ static time_t start_tv_sec;
|
||||
+ static suseconds_t start_usec;
|
||||
+ int diff_sec, diff_usec;
|
||||
+
|
||||
+ gettimeofday(&time, NULL);
|
||||
+ tv_sec = time.tv_sec;
|
||||
+ tv_usec = time.tv_usec;
|
||||
+ if (first == TRUE) {
|
||||
+ start_tv_sec = tv_sec;
|
||||
+ start_usec = tv_usec;
|
||||
+ first = FALSE;
|
||||
+ }
|
||||
+ diff_sec = (int)difftime(tv_sec, start_tv_sec);
|
||||
+ diff_usec = (tv_usec - start_usec);
|
||||
+ if (diff_usec < 0) {
|
||||
+ diff_sec--;
|
||||
+ diff_usec += 1000000;
|
||||
+ }
|
||||
+ sprintf(tmpBuffer, "[%d sec: %06d usec]", diff_sec , diff_usec);
|
||||
+ len = strlen(tmpBuffer);
|
||||
+ if (logFile)
|
||||
+ fwrite(tmpBuffer, len, 1, logFile);
|
||||
+
|
||||
/*
|
||||
* Since a va_list can only be processed once, write the string to a
|
||||
* buffer, and then write the buffer out to the appropriate output
|
Loading…
Reference in New Issue
Block a user