1
0
xorg-x11-server/xorg-server-option_libxf86config.diff
Stefan Dirsch c5550f7b6b - xorg-server 1.9.0
* obsolete patches:
    - dmx-silly.patch
    - fixed-SYNC-extension-trigger-BlockHandler-test.diff
    - sw_cursor_on_randr.patch
    - xorg-evdev-conf.diff
    - xorg-server-commit-21ed660.diff
    - xorg-server-revert-event-mask.patch
    - xorg-x11-server-gl-apps-crash.patch
  * adjusted patches
    - 0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch
    - 0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch
    - CVE-2010-2240-tree_depth_limit.patch
    - cache-xkbcomp-output-for-fast-start-up.patch
    - confine_to_shape.diff
    - driver-autoconfig.diff
    - fpic.diff
    - xorg-detect-psb.patch
    - xorg-server-1.8.0.diff
    - xorg-server-nohwaccess.diff
    - xorg-server-option_libxf86config.diff
    - xorg-server-xf4vnc.patch
    - xserver-1.6.1-nouveau.patch
    - xserver-bg-none-root.patch
  * vbe-bufferoverflow.diff
    - fixes vbe buffer overflow
- disabled vnc build for now (standalone server + module)

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=281
2010-08-23 16:11:18 +00:00

123 lines
4.5 KiB
Diff

--- hw/xfree86/parser/InputClass.c.orig 2010-08-13 07:53:48.000000000 +0200
+++ hw/xfree86/parser/InputClass.c 2010-08-23 15:55:16.000000000 +0200
@@ -65,6 +65,47 @@ xf86ConfigSymTabRec InputClassTab[] =
#define TOKEN_SEP "|"
+/*
+ * Tokenize a string into a NULL terminated array of strings. Always returns
+ * an allocated array unless an error occurs.
+ */
+char**
+m_xstrtokenize(const char *str, const char *separators)
+{
+ char **list, **nlist;
+ char *tok, *tmp;
+ unsigned num = 0, n;
+
+ if (!str)
+ return NULL;
+ list = calloc(1, sizeof(*list));
+ if (!list)
+ return NULL;
+ tmp = strdup(str);
+ if (!tmp)
+ goto error;
+ for (tok = strtok(tmp, separators); tok; tok = strtok(NULL, separators)) {
+ nlist = realloc(list, (num + 2) * sizeof(*list));
+ if (!nlist)
+ goto error;
+ list = nlist;
+ list[num] = strdup(tok);
+ if (!list[num])
+ goto error;
+ list[++num] = NULL;
+ }
+ free(tmp);
+ return list;
+
+error:
+ free(tmp);
+ for (n = 0; n < num; n++)
+ free(list[n]);
+ free(list);
+ return NULL;
+}
+
+
static void
add_group_entry(struct list *head, char **values)
{
@@ -125,49 +166,49 @@ xf86parseInputClassSection(void)
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchProduct");
add_group_entry(&ptr->match_product,
- xstrtokenize(val.str, TOKEN_SEP));
+ m_xstrtokenize(val.str, TOKEN_SEP));
break;
case MATCH_VENDOR:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchVendor");
add_group_entry(&ptr->match_vendor,
- xstrtokenize(val.str, TOKEN_SEP));
+ m_xstrtokenize(val.str, TOKEN_SEP));
break;
case MATCH_DEVICE_PATH:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchDevicePath");
add_group_entry(&ptr->match_device,
- xstrtokenize(val.str, TOKEN_SEP));
+ m_xstrtokenize(val.str, TOKEN_SEP));
break;
case MATCH_OS:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchOS");
add_group_entry(&ptr->match_os,
- xstrtokenize(val.str, TOKEN_SEP));
+ m_xstrtokenize(val.str, TOKEN_SEP));
break;
case MATCH_PNPID:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchPnPID");
add_group_entry(&ptr->match_pnpid,
- xstrtokenize(val.str, TOKEN_SEP));
+ m_xstrtokenize(val.str, TOKEN_SEP));
break;
case MATCH_USBID:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchUSBID");
add_group_entry(&ptr->match_usbid,
- xstrtokenize(val.str, TOKEN_SEP));
+ m_xstrtokenize(val.str, TOKEN_SEP));
break;
case MATCH_DRIVER:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchDriver");
add_group_entry(&ptr->match_driver,
- xstrtokenize(val.str, TOKEN_SEP));
+ m_xstrtokenize(val.str, TOKEN_SEP));
break;
case MATCH_TAG:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchTag");
add_group_entry(&ptr->match_tag,
- xstrtokenize(val.str, TOKEN_SEP));
+ m_xstrtokenize(val.str, TOKEN_SEP));
break;
case MATCH_IS_KEYBOARD:
if (xf86getSubToken(&(ptr->comment)) != STRING)
--- hw/xfree86/parser/Layout.c
+++ hw/xfree86/parser/Layout.c
@@ -449,7 +449,10 @@
/* add all AutoServerLayout devices to the server layout */
while (input)
{
- if (xf86CheckBoolOption(input->inp_option_lst, "AutoServerLayout", FALSE))
+ Bool asl_value = FALSE;
+ char *s = xf86findOptionValue(input->inp_option_lst ,"AutoServerLayout");
+ Bool asl_found = xf86getBoolValue(&asl_value, s);
+ if (asl_found == TRUE && asl_value == TRUE)
{
XF86ConfInputrefPtr iref = layout->lay_input_lst;