From: Lennart Poettering Date: Tue, 27 Jun 2023 11:14:17 +0000 (+0200) Subject: tmpfiles: teach tmpfiles the new XDG_STATE_HOME variable too X-Git-Tag: v254-rc1~84^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b50aadaff22f9b3ad3bbcbfd2edd661456a5b4bf;p=thirdparty%2Fsystemd.git tmpfiles: teach tmpfiles the new XDG_STATE_HOME variable too --- diff --git a/man/tmpfiles.d.xml b/man/tmpfiles.d.xml index 495315d55c6..4c972aa9859 100644 --- a/man/tmpfiles.d.xml +++ b/man/tmpfiles.d.xml @@ -736,7 +736,7 @@ d /tmp/foo/bar - - - bmA:1h - %L System or user log directory - In mode, this is the same as $XDG_CONFIG_HOME with /log appended, and /var/log otherwise. + In mode, this is the same as $XDG_STATE_HOME with /log appended, and /var/log otherwise. @@ -744,7 +744,7 @@ d /tmp/foo/bar - - - bmA:1h - %S System or user state directory - In mode, this is the same as $XDG_CONFIG_HOME, and /var/lib otherwise. + In mode, this is the same as $XDG_STATE_HOME, and /var/lib otherwise. %t diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index eabac563207..a7de3c87fe4 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -255,9 +255,9 @@ static int specifier_directory(char specifier, const void *data, const char *roo static const struct table_entry paths_user[] = { [DIRECTORY_RUNTIME] = { SD_PATH_USER_RUNTIME }, - [DIRECTORY_STATE] = { SD_PATH_USER_CONFIGURATION }, + [DIRECTORY_STATE] = { SD_PATH_USER_STATE_PRIVATE }, [DIRECTORY_CACHE] = { SD_PATH_USER_STATE_CACHE }, - [DIRECTORY_LOGS] = { SD_PATH_USER_CONFIGURATION, "log" }, + [DIRECTORY_LOGS] = { SD_PATH_USER_STATE_PRIVATE, "log" }, }; const struct table_entry *paths;