diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-06-12 17:04:27 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-08-24 16:47:08 +0200 |
commit | dd656b3679e4b5a7ec3534bf8786b022327e080d (patch) | |
tree | 6b9e903037c207344610befd40dd4cee2f8abe9a /src/test/test-copy.c | |
parent | 3f87ae2530d8bb022f54526c3a568165a34acf05 (diff) |
tree-wide: drop 'This file is part of systemd' blurb
This part of the copyright blurb stems from the GPL use recommendations:
https://www.gnu.org/licenses/gpl-howto.en.html
The concept appears to originate in times where version control was per
file, instead of per tree, and was a way to glue the files together.
Ultimately, we nowadays don't live in that world anymore, and this
information is entirely useless anyway, as people are very welcome to
copy these files into any projects they like, and they shouldn't have to
change bits that are part of our copyright header for that.
hence, let's just get rid of this old cruft, and shorten our codebase a
bit.
Diffstat (limited to 'src/test/test-copy.c')
-rw-r--r-- | src/test/test-copy.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/test/test-copy.c b/src/test/test-copy.c index 9dc0ddf95..94d3485db 100644 --- a/src/test/test-copy.c +++ b/src/test/test-copy.c @@ -1,7 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ /*** - This file is part of systemd - Copyright 2014 Ronny Chevalier ***/ @@ -242,26 +240,7 @@ 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(); @@ -275,7 +254,6 @@ 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; } |