summaryrefslogtreecommitdiff
path: root/src/vconsole
diff options
context:
space:
mode:
Diffstat (limited to 'src/vconsole')
-rw-r--r--src/vconsole/vconsole-setup.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
index b7a536b983..28371711b6 100644
--- a/src/vconsole/vconsole-setup.c
+++ b/src/vconsole/vconsole-setup.c
@@ -54,8 +54,9 @@ static int disable_utf8(int fd) {
if (ioctl(fd, KDSKBMODE, K_XLATE) < 0)
r = -errno;
- if (loop_write(fd, "\033%@", 3, false) < 0)
- r = -errno;
+ k = loop_write(fd, "\033%@", 3, false);
+ if (k < 0)
+ r = k;
k = write_string_file("/sys/module/vt/parameters/default_utf8", "0");
if (k < 0)
@@ -86,8 +87,9 @@ static int enable_utf8(int fd) {
r = -errno;
}
- if (loop_write(fd, "\033%G", 3, false) < 0)
- r = -errno;
+ k = loop_write(fd, "\033%G", 3, false);
+ if (k < 0)
+ r = k;
k = write_string_file("/sys/module/vt/parameters/default_utf8", "1");
if (k < 0)