summaryrefslogtreecommitdiffstats
path: root/lib/consoles.c
diff options
context:
space:
mode:
authorKarel Zak2012-11-08 17:25:09 +0100
committerKarel Zak2012-11-08 17:25:09 +0100
commit53e0a68806bc4b1d605ca92edbdd1a234c0960a8 (patch)
treed770f1cc21b1969a9001352fe2d2046100bb2923 /lib/consoles.c
parentlib/consoles: remove global variable comparedev (diff)
downloadkernel-qcow2-util-linux-53e0a68806bc4b1d605ca92edbdd1a234c0960a8.tar.gz
kernel-qcow2-util-linux-53e0a68806bc4b1d605ca92edbdd1a234c0960a8.tar.xz
kernel-qcow2-util-linux-53e0a68806bc4b1d605ca92edbdd1a234c0960a8.zip
lib/consoles: remove global variable initcp
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib/consoles.c')
-rw-r--r--lib/consoles.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/consoles.c b/lib/consoles.c
index 2e9793f0e..bc7c039bd 100644
--- a/lib/consoles.c
+++ b/lib/consoles.c
@@ -170,13 +170,6 @@ char* scandev(DIR *dir, dev_t comparedev)
/*
* Default control characters for an unknown terminal line.
*/
-static
-struct chardata initcp = {
- CERASE,
- CKILL,
- CTRL('r'),
- 0
-};
/*
* Allocate an aligned `struct console' memory area,
@@ -192,8 +185,15 @@ __attribute__((__nonnull__,__hot__))
#endif
void consalloc(char * name)
{
+ static const struct chardata initcp = {
+ .erase = CERASE,
+ .kill = CKILL,
+ .eol = CTRL('r'),
+ .parity = 0
+ };
struct console *restrict tail;
+
if (posix_memalign((void*)&tail, sizeof(void*), alignof(typeof(struct console))) != 0)
perror("memory allocation");