summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-01-06 01:28:30 +0100
committerMichal Schmidt <mschmidt@redhat.com>2012-01-06 01:28:30 +0100
commitdf465b3f4419b6ba2e12bf9a5f7d7bde5a0c3531 (patch)
tree4aa02d0aec92868bbffdf380876b1b2e36c2c07a
parentlogin: implement sd_session_get_service() (diff)
downloadsystemd-df465b3f4419b6ba2e12bf9a5f7d7bde5a0c3531.tar.gz
systemd-df465b3f4419b6ba2e12bf9a5f7d7bde5a0c3531.tar.bz2
systemd-df465b3f4419b6ba2e12bf9a5f7d7bde5a0c3531.zip
util: fix switching to console unicode mode
The KDSKBMODE ioctl wants a value directly, not its address.
-rw-r--r--src/util.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index 2b735e841..1cff54708 100644
--- a/src/util.c
+++ b/src/util.c
@@ -2453,7 +2453,6 @@ int ask(char *ret, const char *replies, const char *text, ...) {
int reset_terminal_fd(int fd) {
struct termios termios;
int r = 0;
- long arg;
/* Set terminal to some sane defaults */
@@ -2467,8 +2466,7 @@ int reset_terminal_fd(int fd) {
ioctl(fd, TIOCNXCL);
/* Enable console unicode mode */
- arg = K_UNICODE;
- ioctl(fd, KDSKBMODE, &arg);
+ ioctl(fd, KDSKBMODE, K_UNICODE);
if (tcgetattr(fd, &termios) < 0) {
r = -errno;