diff options
author | Karel Zak | 2012-11-08 17:25:09 +0100 |
---|---|---|
committer | Karel Zak | 2012-11-08 17:25:09 +0100 |
commit | 53e0a68806bc4b1d605ca92edbdd1a234c0960a8 (patch) | |
tree | d770f1cc21b1969a9001352fe2d2046100bb2923 /lib | |
parent | lib/consoles: remove global variable comparedev (diff) | |
download | kernel-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')
-rw-r--r-- | lib/consoles.c | 14 |
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"); |