From patchwork Sun Dec 8 11:26:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 16413 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4AF1517869; Sun, 8 Dec 2019 11:28:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 15FD7177CB for ; Sun, 8 Dec 2019 11:28:10 +0000 (GMT) Received: from localhost ([::1]:57732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idujR-0004uT-JM for patchwork@mira.cbaines.net; Sun, 08 Dec 2019 06:28:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36896) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idujK-0004u2-Uo for guix-patches@gnu.org; Sun, 08 Dec 2019 06:28:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1idujK-0000Vl-0A for guix-patches@gnu.org; Sun, 08 Dec 2019 06:28:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44624) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1idujJ-0000Uw-Qn for guix-patches@gnu.org; Sun, 08 Dec 2019 06:28:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1idujJ-0007v9-OI for guix-patches@gnu.org; Sun, 08 Dec 2019 06:28:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38518] [PATCH 4/7] serialization: Remove unused procedure. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 Dec 2019 11:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38518 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38518@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 38518-submit@debbugs.gnu.org id=B38518.157580442430352 (code B ref 38518); Sun, 08 Dec 2019 11:28:01 +0000 Received: (at 38518) by debbugs.gnu.org; 8 Dec 2019 11:27:04 +0000 Received: from localhost ([127.0.0.1]:50589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iduiN-0007tS-ME for submit@debbugs.gnu.org; Sun, 08 Dec 2019 06:27:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iduiJ-0007rr-Q1 for 38518@debbugs.gnu.org; Sun, 08 Dec 2019 06:26:59 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iduiE-0004Jt-KK; Sun, 08 Dec 2019 06:26:54 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=55006 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iduiD-0003cW-4K; Sun, 08 Dec 2019 06:26:53 -0500 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sun, 8 Dec 2019 12:26:34 +0100 Message-Id: <20191208112637.5534-4-ludo@gnu.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191208112637.5534-1-ludo@gnu.org> References: <20191208112637.5534-1-ludo@gnu.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/serialization.scm (write-contents): Remove. --- guix/serialization.scm | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/guix/serialization.scm b/guix/serialization.scm index cf263d321e..f793feb53d 100644 --- a/guix/serialization.scm +++ b/guix/serialization.scm @@ -199,24 +199,6 @@ substitute invalid byte sequences with question marks. This is a (put-bytevector out buf 0 read) (loop (- left read)))))))) -(define (write-contents file p size) - "Write SIZE bytes from FILE to output port P." - (define (call-with-binary-input-file file proc) - ;; Open FILE as a binary file. This avoids scan-for-encoding, and thus - ;; avoids any initial buffering. Disable file name canonicalization to - ;; avoid stat'ing like crazy. - (with-fluids ((%file-port-name-canonicalization #f)) - (let ((port (open-file file "rb"))) - (dynamic-wind - (const #t) - (cut proc port) - (lambda () - (close-port port)))))) - - (call-with-binary-input-file file - (lambda (input) - (write-contents-from-port input p size)))) - (define (write-contents-from-port input output size) "Write SIZE bytes from port INPUT to port OUTPUT." (write-string "contents" output)