diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/conf-files.h | 3 | ||||
-rw-r--r-- | src/basic/format-util.h | 3 | ||||
-rw-r--r-- | src/basic/hash-funcs.c | 3 | ||||
-rw-r--r-- | src/basic/hash-funcs.h | 3 | ||||
-rw-r--r-- | src/basic/hashmap.c | 3 | ||||
-rw-r--r-- | src/basic/hashmap.h | 3 | ||||
-rw-r--r-- | src/basic/mempool.c | 3 | ||||
-rw-r--r-- | src/basic/mempool.h | 3 | ||||
-rw-r--r-- | src/basic/mkdir-label.c | 3 | ||||
-rw-r--r-- | src/basic/mkdir.h | 3 | ||||
-rw-r--r-- | src/basic/unaligned.h | 3 | ||||
-rw-r--r-- | src/basic/utf8.c | 3 | ||||
-rw-r--r-- | src/login/logind-session-device.c | 3 | ||||
-rw-r--r-- | src/login/logind-session-device.h | 3 | ||||
-rw-r--r-- | src/login/logind-utmp.c | 3 | ||||
-rw-r--r-- | src/test/test-conf-parser.c | 3 | ||||
-rw-r--r-- | src/test/test-copy.c | 23 | ||||
-rw-r--r-- | src/test/test-ellipsize.c | 3 | ||||
-rw-r--r-- | src/test/test-exec-util.c | 3 | ||||
-rw-r--r-- | src/test/test-extract-word.c | 3 | ||||
-rw-r--r-- | src/test/test-locale-util.c | 3 | ||||
-rw-r--r-- | src/test/test-parse-util.c | 3 | ||||
-rw-r--r-- | src/test/test-process-util.c | 3 | ||||
-rw-r--r-- | src/test/test-siphash24.c | 3 | ||||
-rw-r--r-- | src/test/test-unaligned.c | 3 | ||||
-rw-r--r-- | src/test/test-util.c | 3 |
26 files changed, 20 insertions, 78 deletions
diff --git a/src/basic/conf-files.h b/src/basic/conf-files.h index 7bd0e25ed..9da03ed22 100644 --- a/src/basic/conf-files.h +++ b/src/basic/conf-files.h @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -/*** - Copyright © 2010-2012 Kay Sievers -***/ enum { CONF_FILES_EXECUTABLE = 1 << 0, diff --git a/src/basic/format-util.h b/src/basic/format-util.h index 81c59ac8c..160550cd6 100644 --- a/src/basic/format-util.h +++ b/src/basic/format-util.h @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -/*** - Copyright © 2015 Ronny Chevalier -***/ #include <inttypes.h> diff --git a/src/basic/hash-funcs.c b/src/basic/hash-funcs.c index 289234688..db48437be 100644 --- a/src/basic/hash-funcs.c +++ b/src/basic/hash-funcs.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2014 Michal Schmidt -***/ #include <string.h> diff --git a/src/basic/hash-funcs.h b/src/basic/hash-funcs.h index 3715c56e0..5e5989f02 100644 --- a/src/basic/hash-funcs.h +++ b/src/basic/hash-funcs.h @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -/*** - Copyright © 2014 Michal Schmidt -***/ #include "macro.h" #include "siphash24.h" diff --git a/src/basic/hashmap.c b/src/basic/hashmap.c index 5dff27425..15c8c8816 100644 --- a/src/basic/hashmap.c +++ b/src/basic/hashmap.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2014 Michal Schmidt -***/ #include <errno.h> #include <stdint.h> diff --git a/src/basic/hashmap.h b/src/basic/hashmap.h index d1d1b9c8a..5c70c102d 100644 --- a/src/basic/hashmap.h +++ b/src/basic/hashmap.h @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -/*** - Copyright © 2014 Michal Schmidt -***/ #include <limits.h> #include <stdbool.h> diff --git a/src/basic/mempool.c b/src/basic/mempool.c index 567f6b916..a5ec8a102 100644 --- a/src/basic/mempool.c +++ b/src/basic/mempool.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2014 Michal Schmidt -***/ #include <stdint.h> #include <stdlib.h> diff --git a/src/basic/mempool.h b/src/basic/mempool.h index 291415deb..2a41cb358 100644 --- a/src/basic/mempool.h +++ b/src/basic/mempool.h @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -/*** - Copyright © 2014 Michal Schmidt -***/ #include <stddef.h> diff --git a/src/basic/mkdir-label.c b/src/basic/mkdir-label.c index d5c972d72..07799ab01 100644 --- a/src/basic/mkdir-label.c +++ b/src/basic/mkdir-label.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2013 Kay Sievers -***/ #include <stdio.h> #include <sys/stat.h> diff --git a/src/basic/mkdir.h b/src/basic/mkdir.h index 517dbe07d..8016c38e9 100644 --- a/src/basic/mkdir.h +++ b/src/basic/mkdir.h @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -/*** - Copyright © 2013 Kay Sievers -***/ #include <sys/types.h> diff --git a/src/basic/unaligned.h b/src/basic/unaligned.h index 965a5fe99..8a1d06445 100644 --- a/src/basic/unaligned.h +++ b/src/basic/unaligned.h @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -/*** - Copyright © 2014 Tom Gundersen -***/ #include <endian.h> #include <stdint.h> diff --git a/src/basic/utf8.c b/src/basic/utf8.c index 2bdda21af..42818358e 100644 --- a/src/basic/utf8.c +++ b/src/basic/utf8.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2008-2011 Kay Sievers -***/ /* Parts of this file are based on the GLIB utf8 validation functions. The * original license text follows. */ diff --git a/src/login/logind-session-device.c b/src/login/logind-session-device.c index e10b810dc..50e20f961 100644 --- a/src/login/logind-session-device.c +++ b/src/login/logind-session-device.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2013 David Herrmann -***/ #include <fcntl.h> #include <linux/input.h> diff --git a/src/login/logind-session-device.h b/src/login/logind-session-device.h index 81b9dcf12..f42c0218c 100644 --- a/src/login/logind-session-device.h +++ b/src/login/logind-session-device.h @@ -1,9 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ #pragma once -/*** - Copyright © 2013 David Herrmann -***/ typedef enum DeviceType DeviceType; typedef struct SessionDevice SessionDevice; diff --git a/src/login/logind-utmp.c b/src/login/logind-utmp.c index 37ae05e8b..f18147688 100644 --- a/src/login/logind-utmp.c +++ b/src/login/logind-utmp.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2015 Daniel Mack -***/ #include <errno.h> #include <pwd.h> diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c index 9a9e7ab4d..a8df45941 100644 --- a/src/test/test-conf-parser.c +++ b/src/test/test-conf-parser.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2015 Ronny Chevalier -***/ #include "conf-parser.h" #include "fd-util.h" diff --git a/src/test/test-copy.c b/src/test/test-copy.c index b893c4996..b3dfedd36 100644 --- a/src/test/test-copy.c +++ b/src/test/test-copy.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2014 Ronny Chevalier -***/ #include <unistd.h> @@ -240,7 +237,26 @@ static void test_copy_bytes_regular_file(const char *src, bool try_reflink, uint unlink(fn3); } +static void test_copy_atomic(void) { + _cleanup_(rm_rf_physical_and_freep) char *p = NULL; + const char *q; + int r; + + assert_se(mkdtemp_malloc(NULL, &p) >= 0); + + q = strjoina(p, "/fstab"); + + r = copy_file_atomic("/etc/fstab", q, 0644, 0, COPY_REFLINK); + if (r == -ENOENT) + return; + + assert_se(copy_file_atomic("/etc/fstab", q, 0644, 0, COPY_REFLINK) == -EEXIST); + + assert_se(copy_file_atomic("/etc/fstab", q, 0644, 0, COPY_REPLACE) >= 0); +} + int main(int argc, char *argv[]) { + log_set_max_level(LOG_DEBUG); #if 0 /// UNNEEDED by elogind test_copy_file(); @@ -254,6 +270,7 @@ int main(int argc, char *argv[]) { test_copy_bytes_regular_file(argv[0], true, 1000); test_copy_bytes_regular_file(argv[0], false, 32000); /* larger than copy buffer size */ test_copy_bytes_regular_file(argv[0], true, 32000); + test_copy_atomic(); return 0; } diff --git a/src/test/test-ellipsize.c b/src/test/test-ellipsize.c index 662d1e7cc..5e0c7577f 100644 --- a/src/test/test-ellipsize.c +++ b/src/test/test-ellipsize.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2013 Shawn Landden -***/ #include <stdio.h> diff --git a/src/test/test-exec-util.c b/src/test/test-exec-util.c index d0e20ee6d..030328391 100644 --- a/src/test/test-exec-util.c +++ b/src/test/test-exec-util.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2013 Thomas H.P. Andersen -***/ #include <errno.h> #include <string.h> diff --git a/src/test/test-extract-word.c b/src/test/test-extract-word.c index 66f30304d..c347605a9 100644 --- a/src/test/test-extract-word.c +++ b/src/test/test-extract-word.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2013 Thomas H.P. Andersen -***/ #include <errno.h> #include <stdlib.h> diff --git a/src/test/test-locale-util.c b/src/test/test-locale-util.c index 5b835566f..8ffae8ca0 100644 --- a/src/test/test-locale-util.c +++ b/src/test/test-locale-util.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2014 Ronny Chevalier -***/ #include "locale-util.h" #include "macro.h" diff --git a/src/test/test-parse-util.c b/src/test/test-parse-util.c index 757ebd629..73688952f 100644 --- a/src/test/test-parse-util.c +++ b/src/test/test-parse-util.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2013 Thomas H.P. Andersen -***/ #include <errno.h> #include <locale.h> diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c index a57bd8c7f..bbaf3f925 100644 --- a/src/test/test-process-util.c +++ b/src/test/test-process-util.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2013 Thomas H.P. Andersen -***/ #include <sched.h> #include <sys/mount.h> diff --git a/src/test/test-siphash24.c b/src/test/test-siphash24.c index e340388d8..218200e48 100644 --- a/src/test/test-siphash24.c +++ b/src/test/test-siphash24.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2015 Tom Gundersen -***/ #include "siphash24.h" #include "util.h" diff --git a/src/test/test-unaligned.c b/src/test/test-unaligned.c index 853312e58..96d6b22be 100644 --- a/src/test/test-unaligned.c +++ b/src/test/test-unaligned.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2014 Tom Gundersen -***/ #include "sparse-endian.h" #include "unaligned.h" diff --git a/src/test/test-util.c b/src/test/test-util.c index cf0fbc509..36dfeb5c3 100644 --- a/src/test/test-util.c +++ b/src/test/test-util.c @@ -1,7 +1,4 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ -/*** - Copyright © 2013 Thomas H.P. Andersen -***/ #include <errno.h> #include <string.h> |