Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752656AbbKAK6S (ORCPT ); Sun, 1 Nov 2015 05:58:18 -0500 Received: from mail.skyhub.de ([78.46.96.112]:32882 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752460AbbKAK6Q (ORCPT ); Sun, 1 Nov 2015 05:58:16 -0500 Date: Sun, 1 Nov 2015 11:58:01 +0100 From: Borislav Petkov To: "Kweh, Hock Leong" Cc: Matt Fleming , Greg Kroah-Hartman , "Ong, Boon Leong" , LKML , "linux-efi@vger.kernel.org" , Sam Protsenko , Peter Jones , Andy Lutomirski , Roy Franz , James Bottomley , Linux FS Devel , "Fleming, Matt" , "Anvin, H Peter" Subject: Re: [PATCH v9 1/1] efi: a misc char interface for user to update efi firmware Message-ID: <20151101105801.GB12711@pd.tnic> References: <1446055138-26047-1-git-send-email-hock.leong.kweh@intel.com> <1446055138-26047-2-git-send-email-hock.leong.kweh@intel.com> <20151101102944.GA12711@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1081 Lines: 30 On Sun, Nov 01, 2015 at 10:52:52AM +0000, Kweh, Hock Leong wrote: > Could you share me your dumb file? I did perform negative test, but I did > not get these dump stack in dmesg. Thanks. I think almost any file works: cat /bin/ls > /dev/efi_capsule_loader > > > +#define UPLOAD_DONE -1 > > > > Isn't the fact that upload was finished a success message? If so, why is it a > > negative value? > > This is to indicate an upload is done and pending for close(2). If a subsequence > write(2) perform, return error. Comments inputted by Matt and Andy. But in that case you can return ERR_OCCURRED. UPLOAD_DONE still doesn't look like a negative value to me as it signals that the upload was done and thus successful as no errors happened during the upload. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/