From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753337AbbIIOFC (ORCPT ); Wed, 9 Sep 2015 10:05:02 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:35341 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751870AbbIIOEw (ORCPT ); Wed, 9 Sep 2015 10:04:52 -0400 Date: Wed, 9 Sep 2015 15:04:48 +0100 From: "'Matt Fleming'" To: "Kweh, Hock Leong" Cc: Greg Kroah-Hartman , "Ong, Boon Leong" , LKML , "linux-efi@vger.kernel.org" , Sam Protsenko , Peter Jones , Andy Lutomirski , Roy Franz , Borislav Petkov , James Bottomley , Linux FS Devel , "Fleming, Matt" Subject: Re: [PATCH v5 2/2] efi: a misc char interface for user to update efi firmware Message-ID: <20150909140448.GI4973@codeblueprint.co.uk> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 02 Sep, at 06:31:36AM, Kweh Hock Leong wrote: > > I have done an experiment on that by using the misc char device file note. > I included the flush() callback function to the fops. In flush(), I put a printk() > and return -EINVAL. When I perform "cat XXX > /dev/XXX" on Intel Quark > Galileo platform, I found that the flush() is not just being called at file > close, it will also being called before the file write. And the error return, that I > forced in the flush(), does not show up at shell terminal. This is the reason that > I did not follow James recommendation and figure out to do it at write(). OK, that's interesting. Which cat tool is included with the Quark BSP? -- Matt Fleming, Intel Open Source Technology Center