chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eff4063
)
util: fix switching to console unicode mode
author
Michal Schmidt
<mschmidt@redhat.com>
Fri, 6 Jan 2012 00:28:30 +0000
(
01:28
+0100)
committer
Michal Schmidt
<mschmidt@redhat.com>
Fri, 6 Jan 2012 00:28:30 +0000
(
01:28
+0100)
The KDSKBMODE ioctl wants a value directly, not its address.
src/util.c
patch
|
blob
|
history
diff --git
a/src/util.c
b/src/util.c
index 2b735e8413bfeb7649c731a866de7c8bbfb8147c..1cff54708bde44711f7402711e0044e75351bf3f 100644
(file)
--- 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;