mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 06:25:37 +03:00
locale: decouple vconsole_read_data() from x11_read_data()
Let's make library-functions simple and independent as possible as they are. No functional change, just refactoring.
This commit is contained in:
parent
f41338da6e
commit
189cacabe9
@ -325,10 +325,6 @@ int x11_read_data(Context *c, sd_bus_message *m) {
|
||||
|
||||
assert(c);
|
||||
|
||||
r = vconsole_read_data(c, m);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
/* Do not try to re-read the file within single bus operation. */
|
||||
if (m) {
|
||||
if (m == c->x11_cache)
|
||||
|
@ -140,6 +140,10 @@ static int property_get_xkb(
|
||||
|
||||
assert(property);
|
||||
|
||||
r = vconsole_read_data(c, reply);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = x11_read_data(c, reply);
|
||||
if (r < 0)
|
||||
return r;
|
||||
@ -613,6 +617,12 @@ static int method_set_x11_keyboard(sd_bus_message *m, void *userdata, sd_bus_err
|
||||
return sd_bus_error_set(error, SD_BUS_ERROR_INVALID_ARGS, "Specified keymap cannot be compiled, refusing as invalid.");
|
||||
}
|
||||
|
||||
r = vconsole_read_data(c, m);
|
||||
if (r < 0) {
|
||||
log_error_errno(r, "Failed to read virtual console keymap data: %m");
|
||||
return sd_bus_error_set_errnof(error, r, "Failed to read virtual console keymap data: %m");
|
||||
}
|
||||
|
||||
r = x11_read_data(c, m);
|
||||
if (r < 0) {
|
||||
log_error_errno(r, "Failed to read x11 keyboard layout data: %m");
|
||||
|
Loading…
Reference in New Issue
Block a user