int r, p;
char **l = NULL;
- r = load_env_file("/etc/locale.conf", NULL, &l);
+ r = load_env_file(NULL, "/etc/locale.conf", NULL, &l);
if (r < 0 && r != -ENOENT)
return r;
int r;
_cleanup_strv_free_ char **l = NULL;
- r = load_env_file("/etc/vconsole.conf", NULL, &l);
+ r = load_env_file(NULL, "/etc/vconsole.conf", NULL, &l);
if (r < 0 && r != -ENOENT)
return r;
}
}
- if (matching > 0 &&
- streq_ptr(c->x11_model, a[2])) {
- matching++;
-
- if (streq_ptr(c->x11_variant, a[3])) {
+ if (matching > 0) {
+ if (isempty(c->x11_model) || streq_ptr(c->x11_model, a[2])) {
matching++;
- if (streq_ptr(c->x11_options, a[4]))
+ if (streq_ptr(c->x11_variant, a[3])) {
matching++;
+
+ if (streq_ptr(c->x11_options, a[4]))
+ matching++;
+ }
}
}
return r;
}
- r = sd_bus_add_object_vtable(bus, "/org/freedesktop/locale1", "org.freedesktop.locale1", locale_vtable, c);
+ r = sd_bus_add_object_vtable(bus, NULL, "/org/freedesktop/locale1", "org.freedesktop.locale1", locale_vtable, c);
if (r < 0) {
log_error("Failed to register object: %s", strerror(-r));
return r;