]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
copyfilerange: Remove newline from error messages
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sat, 18 Apr 2026 08:18:00 +0000 (10:18 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Sat, 18 Apr 2026 08:18:00 +0000 (10:18 +0200)
The errx function adds a newline by itself already.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
misc-utils/copyfilerange.c

index a4baf60ce74087a712d09c66e433039ad4f06c9a..5bf700f976b7c4b309cdcb7beaac2568af4e989b 100644 (file)
@@ -148,7 +148,7 @@ static void copy_range(struct rangeitem *range) {
                                                range->out_fd, &range->out_offset, chunk, 0);
                if (copied < 0)
                        errx(EXIT_FAILURE, _("failed to copy range %jd:%jd:%ju "
-                                               "from %s to %s with %ju remaining: %m\n"),
+                                               "from %s to %s with %ju remaining: %m"),
                                                (intmax_t) range->in_offset, (intmax_t) range->out_offset,
                                                                range->length, range->in_filename,
                                                                range->out_filename, remaining);
@@ -162,7 +162,7 @@ static void copy_range(struct rangeitem *range) {
 static void handle_range(char* str, struct rangeitem *range)
 {
        if (parse_range(str, range) != 0)
-               errx(EXIT_FAILURE, _("invalid range format: %s\n"), str);
+               errx(EXIT_FAILURE, _("invalid range format: %s"), str);
 
        if (!range->length)
                range->length = range->in_st_size - range->in_offset;