summaryrefslogtreecommitdiff
path: root/src/shutdownd
Commit message (Collapse)AuthorAgeFilesLines
* Use initalization instead of explicit zeroingZbigniew Jędrzejewski-Szmek2013-04-051-23/+18
| | | | | | | | | | | | | | | | | | | | | | | 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.
* util: rename write_one_line_file() to write_string_file()Lennart Poettering2013-04-031-1/+1
| | | | | You can write much more than just one line with this call (and we frequently do), so let's correct the naming.
* shutdownd: shut up bogus gcc warningZbigniew Jędrzejewski-Szmek2013-03-211-13/+10
| | | | | | | | | | This one is fake. But let's kill it, avoiding two condition checks in the process. src/shutdownd/shutdownd.c: In function 'when_wall': src/shutdownd/shutdownd.c:182:44: warning: 'sub' may be used uninitialized in this function [-Wmaybe-uninitialized] return elapse > sub ? elapse - sub : 1; ^
* honor SELinux labels, when creating and writing config filesHarald Hoyer2013-02-141-0/+1
| | | | | | | 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
* shutdown: allow to specify broadcast message when cancelling shutdownMichal Sekletar2012-08-061-0/+4
| | | | makes shutdown behaviour more compatible
* log.h: new log_oom() -> int -ENOMEM, use itShawn Landden2012-07-261-4/+2
| | | | | | 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
* use "Out of memory." consistantly (or with "\n")Shawn Landden2012-07-251-1/+1
| | | | | | | | glibc/glib both use "out of memory" consistantly so maybe we should consider that instead of this. Eliminates one string out of a number of binaries. Also fixes extra newline in udev/scsi_id
* mkdir: append _label to all mkdir() calls that explicitly set the selinux ↵Kay Sievers2012-05-311-1/+1
| | | | context
* build-sys: add stub makefiles to all subdirs to ease development with emacsLennart Poettering2012-04-131-0/+1
|
* move all tools to subdirsKay Sievers2012-04-121-0/+476