diff options
author | Werner Fink | 2013-01-08 15:38:40 +0100 |
---|---|---|
committer | Karel Zak | 2013-01-08 15:42:12 +0100 |
commit | f5664477cbc7c5f94bf6e640adf01e47880a9b12 (patch) | |
tree | 5d5f90a1be010cb56470da4ad73d33fa49554beb /login-utils/sulogin-consoles.c | |
parent | include: cleanup copyright headers (diff) | |
download | kernel-qcow2-util-linux-f5664477cbc7c5f94bf6e640adf01e47880a9b12.tar.gz kernel-qcow2-util-linux-f5664477cbc7c5f94bf6e640adf01e47880a9b12.tar.xz kernel-qcow2-util-linux-f5664477cbc7c5f94bf6e640adf01e47880a9b12.zip |
include/ttyutils: add default chardata
this one moves the init_chardata to include/ttyutils.h as well as to
lib/include/ttyutils.c. Also the macros CTL/CTRL are fixed in
agetty.c and sulogin.c to use the XOR variant CTL.
[kzak@redhat.com: use macro rather than global variable for default
chardata]
Signed-off-by: Werner Fink <werner@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/sulogin-consoles.c')
-rw-r--r-- | login-utils/sulogin-consoles.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/login-utils/sulogin-consoles.c b/login-utils/sulogin-consoles.c index e1d36711c..b519f7f25 100644 --- a/login-utils/sulogin-consoles.c +++ b/login-utils/sulogin-consoles.c @@ -281,12 +281,6 @@ __attribute__((__nonnull__,__hot__)) #endif int append_console(struct list_head *consoles, const char *name) { - static const struct chardata initcp = { - .erase = CERASE, - .kill = CKILL, - .eol = CTRL('r'), - .parity = 0 - }; struct console *restrict tail; struct console *last = NULL; @@ -300,6 +294,7 @@ int append_console(struct list_head *consoles, const char *name) return -ENOMEM; INIT_LIST_HEAD(&tail->entry); + INIT_CHARDATA(&tail->cp); list_add_tail(&tail->entry, consoles); tail->tty = ((char *) tail) + alignof(struct console); @@ -311,7 +306,6 @@ int append_console(struct list_head *consoles, const char *name) tail->id = last ? last->id + 1 : 0; tail->pid = 0; memset(&tail->tio, 0, sizeof(tail->tio)); - memcpy(&tail->cp, &initcp, sizeof(struct chardata)); return 0; } |