summaryrefslogtreecommitdiff
path: root/src/vconsole
Commit message (Collapse)AuthorAge
* vconsole: match on vtcon events, not fbcon onesJan Engelhardt2015-03-06
| | | | | | | | | | | | | | | | I observe that upon loading of framebuffer drivers, I do not get the desired system font, but the kernel-level defaults (usually lib/fonts/font_8x16.c, but your mileage may vary depending on kernel config and boot options). The fbcon driver may be loaded at a time way before the first framebuffer device is active, such that the vconsole setup helper runs too early. The existing rule is non-fitting. The going live of the fbcon kernel component does not indicate the proper time at which to load the visuals, which really ought to be done when a new vtcon object comes into existence. (The font table is a per-vtcon property.)
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-23
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* treewide: sanitize loop_writeZbigniew Jędrzejewski-Szmek2014-12-09
| | | | | | | loop_write() didn't follow the usual systemd rules and returned status partially in errno and required extensive checks from callers. Some of the callers dealt with this properly, but many did not, treating partial writes as successful. Simplify things by conforming to usual rules.
* vconsole: don't hard-code systemd-vconsole-setup binary pathMichael Biebl2014-12-04
|
* delta: diff returns 1 when files differ, ignore thisZbigniew Jędrzejewski-Szmek2014-11-29
| | | | https://bugs.debian/org/771397
* treewide: another round of simplificationsMichal Schmidt2014-11-28
| | | | | Using the same scripts as in f647962d64e "treewide: yet more log_*_errno + return simplifications".
* treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt2014-11-28
| | | | | | | | | | | If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-28
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-28
| | | | | | | | | | | | | As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
* login: rerun vconsole-setup when switching from vgacon to fbconRay Strode2014-11-06
| | | | | | | | | | | | | | | | | The initialization performed by systemd-vconsole-setup is reset when changing console drivers (say from vgacon to fbcon), so we need to run it in that case. See http://lists.freedesktop.org/archives/systemd-devel/2014-October/023919.html http://lists.freedesktop.org/archives/systemd-devel/2014-October/024423.html http://lists.freedesktop.org/archives/systemd-devel/2014-November/024881.html This commit adds a udev rule to make systemd-vconsole-setup get run when the fbcon device becomes available. (david: moved into new file 90-vconsole.rules instead of 71-seats.rules; build-failures are on me, not on Ray)
* vconsole: silence coverityThomas Hindoe Paaboel Andersen2014-09-30
| | | | | Let's silence coverity here too. There is not much to do if the ioctls to copy the fonts and character maps should fail.
* vconsole-setup: fix inverted error messagesZbigniew Jędrzejewski-Szmek2014-07-07
| | | | | | Introduced in abee28c56d. Pointed-out-by: Werner Fink <werner@suse.de>
* vconsole-setup: run setfont before loadkeysZbigniew Jędrzejewski-Szmek2014-07-06
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=80685
* vconsole: also copy character maps (not just fonts) from vt1 to vt2, vt3, ...Carl Schaefer2014-06-23
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=78796
* util: replace close_nointr_nofail() by a more useful safe_close()Lennart Poettering2014-03-18
| | | | | | | | | | | | | | | safe_close() automatically becomes a NOP when a negative fd is passed, and returns -1 unconditionally. This makes it easy to write lines like this: fd = safe_close(fd); Which will close an fd if it is open, and reset the fd variable correctly. By making use of this new scheme we can drop a > 200 lines of code that was required to test for non-negative fds or to reset the closed fd variable afterwards.
* move _cleanup_ attribute in front of the typeHarald Hoyer2013-04-18
| | | | http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html
* Use initalization instead of explicit zeroingZbigniew Jędrzejewski-Szmek2013-04-05
| | | | | | | | | | | | | | | | | | | | | | | Before, we would initialize many fields twice: first by filling the structure with zeros, and then a second time with the real values. We can let the compiler do the job for us, avoiding one copy. A downside of this patch is that text gets slightly bigger. This is because all zero() calls are effectively inlined: $ size build/.libs/systemd text data bss dec hex filename before 897737 107300 2560 1007597 f5fed build/.libs/systemd after 897873 107300 2560 1007733 f6075 build/.libs/systemd … actually less than 1‰. A few asserts that the parameter is not null had to be removed. I don't think this changes much, because first, it is quite unlikely for the assert to fail, and second, an immediate SEGV is almost as good as an assert.
* vconsole-setup: fix vconsole.conf vs. cmdline overriding logicMichal Schmidt2013-04-05
| | | | | | | | | | | | | | Skipping the parsing of /etc/vconsole.conf just because some values were already assigned from the cmdline never made sense. And by the way, commit f73141d changed the return values of parse_env_file() - it now gives 0 on success. Which means in current HEAD /etc/vconsole.conf overrides the cmdline, which is the reverse of what's expected. We need to parse /etc/vconsole.conf first and then let vconsole.* overrides from cmdline take effect. The behaviour is documented in vconsole.conf(5). https://bugzilla.redhat.com/show_bug.cgi?id=948750
* util: rename write_one_line_file() to write_string_file()Lennart Poettering2013-04-03
| | | | | You can write much more than just one line with this call (and we frequently do), so let's correct the naming.
* ModernizationZbigniew Jędrzejewski-Szmek2013-03-31
| | | | Use _cleanup_ and wrap lines to ~80 chars and such.
* honor SELinux labels, when creating and writing config filesHarald Hoyer2013-02-14
| | | | | | | Also split out some fileio functions to fileio.c and provide a SELinux aware pendant in fileio-label.c see https://bugzilla.redhat.com/show_bug.cgi?id=881577
* vconsole-setup: don't set the kbd mode to unicode if is is currently in ↵Lennart Poettering2013-02-09
| | | | | | raw/off mode Let's not confuse X11
* vconsole: use /dev/vcsa1-15 to check for allocated VTsKay Sievers2013-01-15
|
* vconsole: copy font to tty1-15Kay Sievers2013-01-15
|
* vconsole: upload font to /dev/tty1 and copy it to all allocated VTsKay Sievers2013-01-15
|
* core: drop support for old per-distro configuration files for console, ↵Lennart Poettering2013-01-04
| | | | | | hostname, locale, timezone This simplifies the upstream system code quite a bit. If downstream distributions want to maintain compatibility with their old configuration files, they are welcome to do so, but need to maintain this as patches downstream. The burden needs to be on the distributions to maintain differences here. Our suggestion however is to just convert the old configuration files on upgrade, as multiple distributions already do.
* drop Arch Linux support for reading /etc/rc.confDave Reisner2012-11-03
|
* vconsole: remove Frugalware legacy file supportMiklos Vajna2012-11-03
|
* util: add is_locale_utf8()Michal Schmidt2012-11-02
| | | | | | journalctl and vconsole-setup both implement utf8 locale detection. Let's have a common function for it. The next patch will add another use.
* remove Fedora hostname, locale, vconsole legacy file supportKay Sievers2012-10-24
|
* vconsole: default to the kernel compiled-in keymapTom Gundersen2012-10-03
| | | | | | | | No longer override the default kernel keymap if nothing is specified in vconsole.conf. The default should be to do nothing (i.e., use what is already in the kernel) unless the distro/admin has explicitly requested it.
* vconsole: default to the kernel compiled-in fontTom Gundersen2012-10-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | No longer override the default kernel font if nothing is specified in vconsole.conf. The default kernel font[0] provides ISO-8859-1 and box characters. Users of Arabic, Cyrilic or Hebrew must set a different font manually as these character sets were provided by the old default font [1], but are not any longer. Rationale: * it is counter-intuitive that an empty vconsole.conf file is different from adding FONT=""; * the version of the default font shipped with Arch (which is the upstream one) behaves very badly during early boot[2] (which should admittedly be fixed in the font itself); * the kernel already supplies a default font, it seems reasonable to use that unless anything else is specified; * This also avoids a needless slow call to setfont; and * We don't want to work around problems in the kernel (in case the compiled-in font is not acceptable for whatever reason). [0]: <https://dev.archlinux.org/~tomegun/kernel.bdf> [1]: <https://dev.archlinux.org/~tomegun/latarcyrheb.bdf> [2]: <http://i.imgur.com/J2tM4.jpg>
* log.h: new log_oom() -> int -ENOMEM, use itShawn Landden2012-07-26
| | | | | | also a number of minor fixups and bug fixes: spelling, oom errors that didn't print errors, not properly forwarding error codes, few more consistency issues, et cetera
* MeeGo: Remove build support for MeeGo distribution.Auke Kok2012-07-09
| | | | | | | | | | | | | The MeeGo distribution is still a supported distribution, but will probably not see an updated version of systemd anymore. Most of the development is focussing on Tizen now, and the generic support for building --with-distro=other is more than adequate enough. This patch removes the support as a custom configuration build target in systemd. People who are still building this for the MeeGo distribution should build as "other" distro.
* vconsole-setup: enable utf-8 mode explicitlyTom Gundersen2012-06-19
| | | | | | | | | | | | | | | | | | | | | | | Rather than assuming the console is in utf-8 mode if nothing else is specified, be a bit more robust and enable it explicitly. This fixes a regression compared with Arch's initscripts when not using a framebuffer as the old VGA console would not be in utf-8 mode by default. Furthermore, this would allow vconsole-setup to be used after boot to change the vconsole into utf-8 mode in case it has been set to non-utf-8 mode for whatever reason. I.e, the following would leave the console in utf-8 mode as expected: # export LANG=en_US.ISO-8859-1 # /usr/lib/systemd/systemd-vconsole-setup # export LANG=en_US.UTF-8 # /usr/lib/systemd/systemd-vconsole-setup Reported-by: Xyne <xyne@archlinx.ca> Reported-by: Thomas Bächler <thomas@archlinux.org> Cc: Dave Reisner <dreisner@archlinux.org>
* vconsole: fix some error messagesLennart Poettering2012-05-03
|
* vconsole: fix error messagesLennart Poettering2012-05-03
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=49192
* relicense to LGPLv2.1 (with exceptions)Lennart Poettering2012-04-12
| | | | | | | | | | | | | | We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
* build-sys: add stub makefiles to subdirsLennart Poettering2012-01-05
|
* build-sys: make readahead and vconsole optionalLennart Poettering2011-12-31