Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751780AbaKFM4J (ORCPT ); Thu, 6 Nov 2014 07:56:09 -0500 Received: from mga09.intel.com ([134.134.136.24]:51680 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbaKFM4F (ORCPT ); Thu, 6 Nov 2014 07:56:05 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,325,1413270000"; d="scan'208";a="603421732" From: "Kweh, Hock Leong" To: Andy Lutomirski , Greg KH CC: "Fleming, Matt" , Sam Protsenko , LKML , "Ong, Boon Leong" , "linux-efi@vger.kernel.org" , Ming Lei Subject: RE: [PATCH v2 3/3] efi: Capsule update with user helper interface Thread-Topic: [PATCH v2 3/3] efi: Capsule update with user helper interface Thread-Index: AQHP9+iuHUs9oVBcgkKjHBOxgX5ANZxPaE0AgACL8cD//4fqAIAAgjoAgAAK9YCAAAv/gIAAD3kAgANofuA= Date: Thu, 6 Nov 2014 12:53:54 +0000 Message-ID: References: <1414984030-13859-1-git-send-email-hock.leong.kweh@intel.com> <1414984030-13859-4-git-send-email-hock.leong.kweh@intel.com> <20141104043247.GA23418@kroah.com> <1415110688.26277.36.camel@mfleming-mobl1.ger.corp.intel.com> <20141104154017.GA28113@kroah.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id sA6CuDY6003026 > -----Original Message----- > From: Andy Lutomirski [mailto:luto@amacapital.net] > Sent: Wednesday, November 05, 2014 12:36 AM > > Am I missing something here? The current proposal is missing the > success/failure part, unless you count the loaded count (in a different sysfs > directory) as a useful interface for that. Here is my sample shell script which allow me to do multi capsule binaries upload and obtain error message if error occur: #!/bin/sh old=$(cat /sys/devices/platform/efi_capsule_user_helper/capsule_loaded) for arg in "$@" do if [ -f $arg ] then echo 1 > /sys/class/firmware/efi-capsule-file/loading cat $arg > /sys/class/firmware/efi-capsule-file/data echo 0 > /sys/class/firmware/efi-capsule-file/loading oldtime=$(date +%S) oldtime=$(((time + 2) % 60)) until [ -f /sys/class/firmware/efi-capsule-file/loading ] do newtime=$(date +%S) if [ $newtime -eq $oldtime ] then break fi done old=$((old + 1)) new=$(cat /sys/devices/platform/efi_capsule_user_helper/capsule_loaded) if [ ! $new -eq $old ] then echo "Capsule binary $arg upload failed" dmesg | tail | grep -v platform | grep -e efi exit 1 fi else echo "File $arg not found !!" fi done exit 0 Regards, Wilson ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?