diff options
author | Alexandr Shadchin <alexandr.shadchin@gmail.com> | 2011-01-06 14:43:13 +0500 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-01-07 15:31:21 -0800 |
commit | e2f6e5d976ff8bbe68dc41b51d983cc95c11db84 (patch) | |
tree | 972a01e33c9a9702eca1eac5271875df6c900ead | |
parent | 7d03efb3a3af77ca6831492a793d18b89cc64083 (diff) |
Do not print values of variables XkbRules etc. twice
xf86SetStrOption prints in log value of the variables XkbRules etc.,
there is no need to take this information twice.
Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/kbd.c | 27 |
1 files changed, 5 insertions, 22 deletions
@@ -60,7 +60,6 @@ static void KbdBell(int percent, DeviceIntPtr dev, pointer ctrl, int unused); static void PostKbdEvent(InputInfoPtr pInfo, unsigned int key, Bool down); static void InitKBD(InputInfoPtr pInfo, Bool init); -static void SetXkbOption(InputInfoPtr pInfo, char *name, char **option); static void UpdateLeds(InputInfoPtr pInfo); _X_EXPORT InputDriverRec KBD = { @@ -113,22 +112,6 @@ static char *xkb_layout; static char *xkb_variant; static char *xkb_options; -static void -SetXkbOption(InputInfoPtr pInfo, char *name, char **option) -{ - char *s; - - if ((s = xf86SetStrOption(pInfo->options, name, NULL))) { - if (!s[0]) { - free(s); - *option = NULL; - } else { - *option = s; - xf86Msg(X_CONFIG, "%s: %s: \"%s\"\n", pInfo->name, name, s); - } - } -} - #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 static int NewKbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags); @@ -231,11 +214,11 @@ KbdPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) free(s); } - SetXkbOption(pInfo, "XkbRules", &xkb_rules); - SetXkbOption(pInfo, "XkbModel", &xkb_model); - SetXkbOption(pInfo, "XkbLayout", &xkb_layout); - SetXkbOption(pInfo, "XkbVariant", &xkb_variant); - SetXkbOption(pInfo, "XkbOptions", &xkb_options); + xkb_rules = xf86SetStrOption(pInfo->options, "XkbRules", NULL); + xkb_model = xf86SetStrOption(pInfo->options, "XkbModel", NULL); + xkb_layout = xf86SetStrOption(pInfo->options, "XkbLayout", NULL); + xkb_variant = xf86SetStrOption(pInfo->options, "XkbVariant", NULL); + xkb_options = xf86SetStrOption(pInfo->options, "XkbOptions", NULL); pKbd->CustomKeycodes = FALSE; from = X_DEFAULT; |