Re: [RFC 3/3] efi: add capsule update capability via sysfs

Andy Lutomirski
2015-04-29T23:40:19Z

On Wed, Apr 29, 2015 at 4:36 PM, James Bottomley
<James.Bottomley@hansenpartnership.com> wrote:
> On Wed, 2015-04-29 at 16:25 -0700, Andy Lutomirski wrote:
>> On Wed, Apr 29, 2015 at 4:12 PM, James Bottomley
>> <James.Bottomley@hansenpartnership.com> wrote:
>> > From: James Bottomley <JBottomley@Odin.com>
>> >
>> > The firmware update should be applied simply by doing
>> >
>> > cat fw_file > /sys/firmware/capsule/update
>> >
>> > With a properly formatted fw_file. Any error will be returned on close of
>> > stdout. util-linux returns errors correctly from closing stdout, but firmware
>> > shippers should check whatever utilities package they use correctly captures
>> > the error return on close.
>>
>> s/util-linux/coreutils/
>>
>> This still makes my API sense itch. It's kind of an abuse of
>> open/write/close.
>
> It works ... and according to Alan, NFS is already doing it. I suppose
> we can have a do over of the whole debate again ...

I think that NFS is at least writing to actual files as opposed to
trying to implement some kind of transactions.

Blech, whatever. This approach certainly works, as long as no one
trips over the busybox thing. Maybe there should also be
/sys/something_that_errors_on_close that people can use as a test.

--Andy