#include "pager.h"
#include "set.h"
#include "path-util.h"
+#include "utf8.h"
static bool arg_no_pager = false;
static enum transport {
const char *interface = "";
int r;
DBusMessageIter iter, sub, sub2, sub3;
- StatusInfo info;
+ StatusInfo info = {};
assert(args);
return -EIO;
}
- zero(info);
dbus_message_iter_recurse(&iter, &sub);
while (dbus_message_iter_get_arg_type(&sub) != DBUS_TYPE_INVALID) {
if (e[i].locrec_offset == 0)
continue;
+ if (!utf8_is_valid((char*) p + e[i].name_offset))
+ continue;
+
z = strdup((char*) p + e[i].name_offset);
if (!z) {
r = log_oom();
}
static int add_locales_from_libdir (Set *locales) {
- DIR _cleanup_closedir_ *dir;
+ _cleanup_closedir_ DIR *dir;
struct dirent *entry;
int r;
}
static int list_vconsole_keymaps(DBusConnection *bus, char **args, unsigned n) {
- char _cleanup_strv_free_ **l = NULL;
+ _cleanup_strv_free_ char **l = NULL;
keymaps = set_new(string_hash_func, string_compare_func);
if (!keymaps)
static int list_x11_keymaps(DBusConnection *bus, char **args, unsigned n) {
_cleanup_fclose_ FILE *f = NULL;
- char _cleanup_strv_free_ **list = NULL;
+ _cleanup_strv_free_ char **list = NULL;
char line[LINE_MAX];
enum {
NONE,
return -EINVAL;
}
- f = fopen("/usr/share/X11/xkb/rules/xorg.lst", "re");
+ f = fopen("/usr/share/X11/xkb/rules/base.lst", "re");
if (!f) {
log_error("Failed to open keyboard mapping list. %m");
return -errno;