From patchwork Fri Nov 2 15:17:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 30012 Received: (qmail 32846 invoked by alias); 2 Nov 2018 15:17:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 32634 invoked by uid 89); 2 Nov 2018 15:17:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Date: Fri, 02 Nov 2018 16:17:21 +0100 To: libc-alpha@sourceware.org Subject: [PATCH] support/shell-container.c: Use support_copy_file_range User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20181102151721.11C294399457D@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) 2018-11-02 Florian Weimer * support/shell-container.c (copy_func): Call support_copy_file_range instead of copy_file_range to support cross-device copies. diff --git a/support/shell-container.c b/support/shell-container.c index d303131daf..9bd90d3f60 100644 --- a/support/shell-container.c +++ b/support/shell-container.c @@ -119,7 +119,7 @@ copy_func (char **argv) return 1; } - if (copy_file_range (sfd, 0, dfd, 0, st.st_size, 0) != st.st_size) + if (support_copy_file_range (sfd, 0, dfd, 0, st.st_size, 0) != st.st_size) { fprintf (stderr, "cp: cannot copy file %s to %s: %s\n", sname, dname, strerror (errno));