On Tue, 2017-03-14 at 08:24 +0000, Ard Biesheuvel wrote:
> On 13 March 2017 at 12:46, Kalugin, Evgeny <[email protected]> wrote:
> > From 655a261d71af9de62e0e23ae0eb6f75037ae5e3e Mon Sep 17 00:00:00 2001
> > From: Evgeny Kalugin <[email protected]>
> > Date: Tue, 7 Mar 2017 14:22:25 +0000
> > Subject: [PATCH] pstore: return error code (if any) from efi_pstore_write
> >
> > For some reason return value from actual variable setting was ignored.
> > With this change error code get transferred upwards through call stack.
> >
> > Signed-off-by: Evgeny Kalugin <[email protected]>
>
> Thanks for the patch.
>
> Could you give a bit more detail on how this broke things for you?
Well, it haven't broken much things for me yet. I just found it when
tried to debug one problem in efi-pstore. There I was about to watch
return value from write call, when noticed that it is always zero and
that has not so much sense obviously.
>
> > ---
> > drivers/firmware/efi/efi-pstore.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/firmware/efi/efi-pstore.c
> > b/drivers/firmware/efi/efi-pstore.c
> > index f402ba2..2ea808e 100644
> > --- a/drivers/firmware/efi/efi-pstore.c
> > +++ b/drivers/firmware/efi/efi-pstore.c
> > @@ -274,7 +274,7 @@ static int efi_pstore_write(enum pstore_type_id type,
> > for (i = 0; i < DUMP_NAME_LEN; i++)
> > efi_name[i] = name[i];
> >
> > - efivar_entry_set_safe(efi_name, vendor, PSTORE_EFI_ATTRIBUTES,
> > + ret = efivar_entry_set_safe(efi_name, vendor, PSTORE_EFI_ATTRIBUTES,
> > !pstore_cannot_block_path(reason),
> > size, psi->buf);
> >
> > --
> > 1.9.1
> >
N�����r��y����b�X��ǧv�^�){.n�+����{�y����^n�r���z���h�����&���G���h�(�階�ݢj"���m������z�ޖ���f���h���~�m�