Systemd/src
Dave Reisner 54693d9bfa tmpfiles: use write(2) for the 'w' action
This resolves problems with filesystems which do not implement the
aio_write file operation. In this case, the kernel will fall back using
a loop writing technique for each pointer in a received iovec. The
result is strange errors in dmesg such as:

[   31.855871] elevator: type  not found
[   31.856262] elevator: switch to
[   31.856262]  failed

It does not make sense to implement a synchronous aio_write method for
sysfs as this isn't a real filesystem where a reasonable use case for
using writev exists, nor is there an expectation that tmpfiles will be
used to write more data than can be reasonably written in a single write
syscall.

In addition, some sysfs attrs are currently buggy and will NOT reject
the second write with the newline, causing the sysfs value to be zeroed
out. This of course should be fixed in the kernel regardless of any
wrongdoing in userspace, but this simple change makes us immune to such
a bug.

This change means that we do not write a trailing newline by default, as
the expected use case of 'w' is for sysfs and procfs. In exchange, honor
C-style backslash escapes so that if the newline is really needed, the
user can add it.
2012-09-16 17:18:04 +02:00
..
ac-power build-sys: add stub makefiles to all subdirs to ease development with emacs 2012-04-13 21:37:59 +02:00
analyze manager: extend performance measurement interface to include firmware/loader times 2012-09-13 18:54:32 +02:00
ask-password build-sys: add stub makefiles to all subdirs to ease development with emacs 2012-04-13 21:37:59 +02:00
binfmt continue work with error messages, log_oom() 2012-08-06 16:37:01 +02:00
cgls util: split-out path-util.[ch] 2012-05-08 02:33:10 +02:00
cgroups-agent build-sys: add stub makefiles to all subdirs to ease development with emacs 2012-04-13 21:37:59 +02:00
cgtop continue work with error messages, log_oom() 2012-08-06 16:37:01 +02:00
core socket: prevent signed integer overflow 2012-09-16 16:55:46 +02:00
cryptsetup fix a couple of issues found with llvm-analyze 2012-08-08 23:54:21 +02:00
delta util: rename join() to strjoin() 2012-07-13 13:41:01 +02:00
detect-virt systemd-detect-virt: fix "option '--quiet' requires an argument" 2012-06-04 12:39:22 +02:00
fsck log.h: new log_oom() -> int -ENOMEM, use it 2012-07-26 11:48:26 +02:00
fstab-generator log.h: new log_oom() -> int -ENOMEM, use it 2012-07-26 11:48:26 +02:00
getty-generator log.h: new log_oom() -> int -ENOMEM, use it 2012-07-26 11:48:26 +02:00
gudev update .gitignore 2012-04-13 21:49:25 +02:00
hostname log.h: new log_oom() -> int -ENOMEM, use it 2012-07-26 11:48:26 +02:00
initctl build-sys: add stub makefiles to all subdirs to ease development with emacs 2012-04-13 21:37:59 +02:00
journal man: fix a bunch of typos in docs 2012-09-13 19:34:24 +02:00
libsystemd-daemon sd-daemon: remove unnecessary memset calls 2012-07-23 00:06:06 +02:00
libsystemd-id128 update .gitignore 2012-04-13 21:58:01 +02:00
libudev man: fix a bunch of typos in docs 2012-09-13 19:34:24 +02:00
locale localed: system-setup-keyboard is no more on fedora 2012-09-05 23:54:09 -07:00
login logind: redefine idleness to start at last activity 2012-09-16 11:34:53 +02:00
machine-id-setup log: correct usage of logging API at a few places 2012-07-13 15:45:45 +02:00
modules-load log.h: new log_oom() -> int -ENOMEM, use it 2012-07-26 11:48:26 +02:00
notify build-sys: add stub makefiles to all subdirs to ease development with emacs 2012-04-13 21:37:59 +02:00
nspawn nspawn: fix memleak introduced with automatic cleanup 2012-09-16 16:33:20 +02:00
python-systemd python: make gcc shut up 2012-09-13 19:34:09 +02:00
quotacheck cryptsetup: allow configuration of LUKS disks via the kernel cmdline 2012-06-22 10:11:06 +02:00
random-seed mkdir: append _label to all mkdir() calls that explicitly set the selinux context 2012-05-31 12:40:20 +02:00
rc-local-generator log.h: new log_oom() -> int -ENOMEM, use it 2012-07-26 11:48:26 +02:00
readahead readahead: use 20K instead of 16K as temporary request nr bump 2012-09-13 00:10:35 +02:00
remount-fs service: add options RestartPreventExitStatus and SuccessExitStatus 2012-08-14 14:46:03 +02:00
reply-password build-sys: add stub makefiles to all subdirs to ease development with emacs 2012-04-13 21:37:59 +02:00
shared nspawn: use automatic cleanup for umask 2012-09-16 16:20:09 +02:00
shutdownd shutdown: allow to specify broadcast message when cancelling shutdown 2012-08-06 16:25:55 +02:00
sleep journal: generate structured journal messages for a number of events 2012-09-03 18:59:04 -07:00
stdio-bridge build-sys: add stub makefiles to all subdirs to ease development with emacs 2012-04-13 21:37:59 +02:00
sysctl sysctl: apply configuration at once 2012-08-06 18:24:05 +02:00
system-update-generator log.h: new log_oom() -> int -ENOMEM, use it 2012-07-26 11:48:26 +02:00
systemctl systemctl: show unit name when a job fails 2012-09-14 15:11:07 +02:00
systemd daemon: Fix broken links to sd-daemon.c 2012-09-13 20:08:54 +02:00
test install: treat non-existent directory as empty 2012-09-16 14:00:25 +02:00
timedate timedated: make /etc/timezone a Debian-only thing 2012-09-14 20:20:29 +02:00
timestamp build-sys: add stub makefiles to all subdirs to ease development with emacs 2012-04-13 21:37:59 +02:00
tmpfiles tmpfiles: use write(2) for the 'w' action 2012-09-16 17:18:04 +02:00
tty-ask-password-agent log.h: new log_oom() -> int -ENOMEM, use it 2012-07-26 11:48:26 +02:00
udev man: fix a bunch of typos in docs 2012-09-13 19:34:24 +02:00
update-utmp update-utmp: Don't error out on runlevel updates if utmp doesn't exist 2012-09-13 17:17:32 +02:00
vconsole log.h: new log_oom() -> int -ENOMEM, use it 2012-07-26 11:48:26 +02:00
.gitignore move libsystemd-id128, libsystemd-daemon to subdir 2012-04-12 15:26:39 +02:00
Makefile relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00