From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.visioncatalog.de ([217.6.246.34] helo=root.phytec.de) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VPSYc-0001EB-SZ for barebox@lists.infradead.org; Fri, 27 Sep 2013 07:33:48 +0000 Received: from idefix.phytec.de (idefix.phytec.de [172.16.0.10]) by root.phytec.de (Postfix) with ESMTP id AA532BF0FC for ; Fri, 27 Sep 2013 08:32:38 +0200 (CEST) From: =?UTF-8?q?Teresa=20G=C3=A1mez?= Date: Fri, 27 Sep 2013 09:33:21 +0200 Message-Id: <1380267201-17783-1-git-send-email-t.gamez@phytec.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] lib: Fix copy_file when filesize is FILESIZE_MAX To: barebox@lists.infradead.org VXNpbmcgdGZ0cCBjb21tYW5kIGRvZXMgbm90IHdvcmsgcHJvcGVyIHdoZW4gZmlsZXMKaGF2ZSBG SUxFU0laRV9NQVgsIGFzIGNvcHlfZmlsZSBhbmQgc2hvd19wcm9ncmVzcwpjYW4gbm90IGhhbmRs ZSBpdC4gQ2hlY2sgdGhlIGZpbGUgc2l6ZSBmb3IgRklMRVNJWkVfTUFYCmFuZCBoYW5kbGUgaXQg YXMgZmlsZSBzaXplID0gMC4KClNpZ25lZC1vZmYtYnk6IFRlcmVzYSBHw6FtZXogPHQuZ2FtZXpA cGh5dGVjLmRlPgotLS0KIGxpYi9jb3B5X2ZpbGUuYyAgICAgfCAgICA4ICsrKysrKy0tCiBsaWIv c2hvd19wcm9ncmVzcy5jIHwgICAgNSArKystLQogMiBmaWxlcyBjaGFuZ2VkLCA5IGluc2VydGlv bnMoKyksIDQgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvbG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