[systemd-commits] 2 commits - man/systemd-tmpfiles.xml src/tmpfiles
Zbigniew Jędrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Thu Jan 22 21:13:39 PST 2015
man/systemd-tmpfiles.xml | 17 ++++++++++++-----
src/tmpfiles/tmpfiles.c | 29 +++++------------------------
2 files changed, 17 insertions(+), 29 deletions(-)
New commits:
commit 7fcb4b9b17fcb19c97fdfff689dc0aaaa1391b68
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Thu Jan 22 23:35:34 2015 -0500
tmpfiles: minor simplification
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
index 7edeeb7..389f493 100644
--- a/src/tmpfiles/tmpfiles.c
+++ b/src/tmpfiles/tmpfiles.c
@@ -329,8 +329,7 @@ static int dir_cleanup(
usec_t age;
_cleanup_free_ char *sub_path = NULL;
- if (streq(dent->d_name, ".") ||
- streq(dent->d_name, ".."))
+ if (STR_IN_SET(dent->d_name, ".", ".."))
continue;
if (fstatat(dirfd(d), dent->d_name, &s, AT_SYMLINK_NOFOLLOW) < 0) {
@@ -765,7 +764,7 @@ static int item_do_children(Item *i, const char *path, action_t action) {
break;
}
- if (streq(de->d_name, ".") || streq(de->d_name, ".."))
+ if (STR_IN_SET(de->d_name, ".", ".."))
continue;
p = strjoin(path, "/", de->d_name, NULL);
@@ -1084,27 +1083,6 @@ static int remove_item_instance(Item *i, const char *instance) {
switch (i->type) {
- case CREATE_FILE:
- case TRUNCATE_FILE:
- case CREATE_DIRECTORY:
- case CREATE_SUBVOLUME:
- case CREATE_FIFO:
- case CREATE_SYMLINK:
- case CREATE_BLOCK_DEVICE:
- case CREATE_CHAR_DEVICE:
- case IGNORE_PATH:
- case IGNORE_DIRECTORY_PATH:
- case ADJUST_MODE:
- case RELABEL_PATH:
- case RECURSIVE_RELABEL_PATH:
- case WRITE_FILE:
- case COPY_FILES:
- case SET_XATTR:
- case RECURSIVE_SET_XATTR:
- case SET_ACL:
- case RECURSIVE_SET_ACL:
- break;
-
case REMOVE_PATH:
if (remove(instance) < 0 && errno != ENOENT)
return log_error_errno(errno, "rm(%s): %m", instance);
@@ -1120,6 +1098,9 @@ static int remove_item_instance(Item *i, const char *instance) {
return log_error_errno(r, "rm_rf(%s): %m", instance);
break;
+
+ default:
+ assert_not_reached("wut?");
}
return 0;
commit d35d791950ddf676d20ffaef43d02eaca1b0d027
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Thu Jan 22 23:32:19 2015 -0500
man: bring tmpfiles.d(5) in line with code
diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml
index fad2cbb..9a9bf17 100644
--- a/man/systemd-tmpfiles.xml
+++ b/man/systemd-tmpfiles.xml
@@ -101,6 +101,7 @@
<varname>w</varname>,
<varname>d</varname>,
<varname>D</varname>,
+ <varname>v</varname>,
<varname>p</varname>,
<varname>L</varname>,
<varname>c</varname>,
@@ -110,7 +111,10 @@
written to. Files and directories
marked with <varname>z</varname>,
<varname>Z</varname>,
- <varname>m</varname> have their
+ <varname>t</varname>,
+ <varname>T</varname>,
+ <varname>a</varname>, and
+ <varname>A</varname> have their
ownership, access mode and security
labels set. </para></listitem>
</varlistentry>
@@ -126,10 +130,13 @@
<varlistentry>
<term><option>--remove</option></term>
<listitem><para>If this option is
- passed, all files and directories
- marked with <varname>r</varname>,
- <varname>R</varname> in the
- configuration files are
+ passed, the contents of
+ directories marked with
+ <varname>D</varname> or
+ <varname>R</varname>, and files or
+ directories themselves marked with
+ <varname>r</varname> or
+ <varname>R</varname> are
removed.</para></listitem>
</varlistentry>
<varlistentry>
More information about the systemd-commits
mailing list