From patchwork Wed Dec 9 11:55:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 65980 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id nB9BtNMf010491 for ; Wed, 9 Dec 2009 11:55:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752446AbZLILzP (ORCPT ); Wed, 9 Dec 2009 06:55:15 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752600AbZLILzP (ORCPT ); Wed, 9 Dec 2009 06:55:15 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:43018 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752446AbZLILzO (ORCPT ); Wed, 9 Dec 2009 06:55:14 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 29AD167BAA; Wed, 9 Dec 2009 11:55:21 +0000 (UTC) From: Mike Frysinger To: linux-kbuild@vger.kernel.org, Andrew Morton Cc: linux-kernel@vger.kernel.org Subject: [PATCH] gen_init_cpio: fixed fwrite warning Date: Wed, 9 Dec 2009 06:55:19 -0500 Message-Id: <1260359719-15744-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.6.5.5 MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org diff --git a/usr/gen_init_cpio.c b/usr/gen_init_cpio.c index 83b3dde..b2b3c2d 100644 --- a/usr/gen_init_cpio.c +++ b/usr/gen_init_cpio.c @@ -354,7 +354,10 @@ static int cpio_mkfile(const char *name, const char *location, push_pad(); if (size) { - fwrite(filebuf, size, 1, stdout); + if (fwrite(filebuf, size, 1, stdout) != 1) { + fprintf(stderr, "writing filebuf failed\n"); + goto error; + } offset += size; push_pad(); }