X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flocale%2Flocaled.c;h=a2d381406c6da0ac3beb9809e154b4da7e9ae7ca;hp=22950a60a988db33db185e1aa38cce5c7503d8ef;hb=f2cc3753ce0e85960f0299855c3b98ba60efa580;hpb=0d0f0c50d3a1d90f03972a6abb82e6413daaa583 diff --git a/src/locale/localed.c b/src/locale/localed.c index 22950a60a..a2d381406 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -271,24 +271,8 @@ static int read_data_x11(void) { free_data_x11(); f = fopen("/etc/X11/xorg.conf.d/00-keyboard.conf", "re"); - if (!f) { - if (errno == ENOENT) { - -#ifdef TARGET_FEDORA - f = fopen("/etc/X11/xorg.conf.d/00-system-setup-keyboard.conf", "re"); - if (!f) { - if (errno == ENOENT) - return 0; - else - return -errno; - } -#else - return 0; -#endif - - } else - return -errno; - } + if (!f) + return errno == ENOENT ? 0 : -errno; while (fgets(line, sizeof(line), f)) { char *l; @@ -577,14 +561,6 @@ static int write_data_x11(void) { isempty(state.x11_variant) && isempty(state.x11_options)) { -#ifdef TARGET_FEDORA - unlink("/etc/X11/xorg.conf.d/00-system-setup-keyboard.conf"); - - /* Symlink this to /dev/null, so that s-s-k (if it is - * still running) doesn't recreate this. */ - symlink("/dev/null", "/etc/X11/xorg.conf.d/00-system-setup-keyboard.conf"); -#endif - if (unlink("/etc/X11/xorg.conf.d/00-keyboard.conf") < 0) return errno == ENOENT ? 0 : -errno; @@ -624,18 +600,8 @@ static int write_data_x11(void) { r = -errno; unlink("/etc/X11/xorg.conf.d/00-keyboard.conf"); unlink(temp_path); - } else { - -#ifdef TARGET_FEDORA - unlink("/etc/X11/xorg.conf.d/00-system-setup-keyboard.conf"); - - /* Symlink this to /dev/null, so that s-s-k (if it is - * still running) doesn't recreate this. */ - symlink("/dev/null", "/etc/X11/xorg.conf.d/00-system-setup-keyboard.conf"); -#endif - + } else r = 0; - } fclose(f); free(temp_path); @@ -1157,7 +1123,9 @@ static DBusHandlerResult locale_message_handler( "Locale\0"); if (!changed) goto oom; - } + } else + strv_free(l); + } else if (dbus_message_is_method_call(message, "org.freedesktop.locale1", "SetVConsoleKeyboard")) { const char *keymap, *keymap_toggle;