locale: fix ENOENT handling for vconsole.conf or xorg.conf

This commit is contained in:
Yu Watanabe
2023-02-02 03:59:21 +09:00
parent 7bfe0a48d9
commit 181ba13b23
+2 -1
View File
@@ -291,6 +291,7 @@ int vconsole_read_data(Context *c, sd_bus_message *m) {
if (fd == -ENOENT) {
c->vc_stat = (struct stat) {};
vc_context_clear(&c->vc);
x11_context_clear(&c->x11_from_vc);
return 0;
}
if (fd < 0)
@@ -337,7 +338,7 @@ int x11_read_data(Context *c, sd_bus_message *m) {
fd = RET_NERRNO(open("/etc/X11/xorg.conf.d/00-keyboard.conf", O_CLOEXEC | O_PATH));
if (fd == -ENOENT) {
c->x11_stat = (struct stat) {};
context_clear_x11(c);
x11_context_clear(&c->x11_from_xorg);
return 0;
}
if (fd < 0)