summaryrefslogtreecommitdiff
path: root/man/tmpfiles.d.xml
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-09-15 12:58:49 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-09-16 17:18:04 +0200
commit54693d9bfa855841e8097d7a6b8c8d7acc068004 (patch)
tree16ca646639c499bd81f1bffe8d0baa8fa2e83394 /man/tmpfiles.d.xml
parentc65a0b146652cac52fe3c43f7cb8fe6a2ac3e063 (diff)
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.
Diffstat (limited to 'man/tmpfiles.d.xml')
-rw-r--r--man/tmpfiles.d.xml5
1 files changed, 4 insertions, 1 deletions
diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml
index c6325a457b..a86ef33695 100644
--- a/man/tmpfiles.d.xml
+++ b/man/tmpfiles.d.xml
@@ -114,7 +114,10 @@ L /tmp/foobar - - - - /dev/null</programlisting>
<varlistentry>
<term><varname>w</varname></term>
- <listitem><para>Write the argument parameter to a file, if it exists. Lines of this type accept shell-style globs in place of normal path names.</para></listitem>
+ <listitem><para>Write the argument parameter to a file, if the file exists.
+ Lines of this type accept shell-style globs in place of normal path
+ names. The argument parameter will be written without a trailing
+ newline. C-style backslash escapes are interpreted.</para></listitem>
</varlistentry>
<varlistentry>