From: Yu Watanabe Date: Wed, 1 Feb 2023 18:17:06 +0000 (+0900) Subject: locale: fix ENOENT handling for vconsole.conf or xorg.conf X-Git-Tag: v253-rc2~6^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=181ba13b23e966df7ebe3c74e95ae0bc475444c5;p=thirdparty%2Fsystemd.git locale: fix ENOENT handling for vconsole.conf or xorg.conf --- diff --git a/src/locale/localed-util.c b/src/locale/localed-util.c index a64adcd9ca4..3c260d86bdf 100644 --- a/src/locale/localed-util.c +++ b/src/locale/localed-util.c @@ -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)