summaryrefslogtreecommitdiff
path: root/src/random-seed
AgeCommit message (Collapse)Author
2016-02-10tree-wide: remove Emacs lines from all filesDaniel Mack
This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
2016-02-06random-seed: provide nicer error message when unable to open fileZbigniew Jędrzejewski-Szmek
If /var is read-only, and the seed file does not exist, we would print a misleading error message for ENOENT. Print both messages instead, to make it easy to diagonose. Also, treat the cases of missing seed file the same as empty seed file and exit successfully. Initialize the return code properly. Fixes https://github.com/systemd/systemd/issues/2530, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813599.
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering
2015-10-26util-lib: split out IO related calls to io-util.[ch]Lennart Poettering
2015-10-25util-lib: split out fd-related operations into fd-util.[ch]Lennart Poettering
There are more than enough to deserve their own .c file, hence move them over.
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-09-09tree-wide: drop {} from one-line if blocksLennart Poettering
Patch via coccinelle.
2015-04-21random-seed: minor cleanups, in particular when it comes to loggingLennart Poettering
2015-01-17random-seed: avoid errors when we cannot write random-seed fileColin Guthrie
When we call 'systemd-random-seed load' with a read-only /var/lib/systemd, the cleanup code (which rewrites the random-seed file) will fail and exit. Arguably, if the filesystem is read-only and the random-seed file exists then this will be possibly be quite bad for entroy on subsequent reboots but it should still not make the unit fail.
2014-12-09treewide: sanitize loop_writeZbigniew Jędrzejewski-Szmek
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.
2014-11-28treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt
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.
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt
It corrrectly handles both positive and negative errno values.
2014-11-28treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt
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().
2013-11-15random-seed: improve debugging messages a bitZbigniew Jędrzejewski-Szmek
2013-09-13random-seed: we should return errno of failed loop_writeLukas Nykryn
2013-08-13random-seed: a few modernizationsLennart Poettering
2012-10-19random-seed: fix error message typoUmut Tezduyar
The file node is /dev/urandom, not /dev/random.
2012-05-31mkdir: append _label to all mkdir() calls that explicitly set the selinux ↵Kay Sievers
context
2012-04-13build-sys: add stub makefiles to all subdirs to ease development with emacsLennart Poettering
2012-04-12move all tools to subdirsKay Sievers