All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
To: Matt Fleming <matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
Cc: Lingzhu Xiang <lxiang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 3/3] selftests/efivarfs: Add create-read test
Date: Tue, 29 Jan 2013 07:40:55 +0900	[thread overview]
Message-ID: <5106FE77.3030001@ozlabs.org> (raw)
In-Reply-To: <1359376629.8282.18.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

Hi all,

>> Empty variable never exists in nvram per spec. Userspace doesn't need an
>> extra
>> EIO to figure out this known fact. In the meantime, user would wonder if
>> something else has gone wrong? Returning zero for reading an empty file can
>> reserve EIO for something more informational.
>
> Perhaps it's not unreasonable to expect users to understand that
> zero-length files don't have a corresponding EFI variable, and that the
> file won't persist across a reboot.
>
> Jeremy, thoughts?

I think that EOF would be better; it's not really an "error" condition, 
just that no data has been given yet.

I'd be happy to change this check to suit.

Cheers,


Jeremy

  parent reply	other threads:[~2013-01-28 22:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-26 22:47 [PATCH 0/3] selftests: Add efivarfs tests Jeremy Kerr
2013-01-26 22:47 ` [PATCH 1/3] selftests: Add tests for efivarfs Jeremy Kerr
2013-01-26 22:47 ` [PATCH 2/3] selftests/efivarfs: Add empty file creation test Jeremy Kerr
2013-01-26 22:47 ` [PATCH 3/3] selftests/efivarfs: Add create-read test Jeremy Kerr
2013-01-28 11:25   ` Lingzhu Xiang
     [not found]     ` <5106603C.5050309-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-28 12:37       ` Matt Fleming
     [not found]         ` <1359376629.8282.18.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-01-28 22:40           ` Jeremy Kerr [this message]
     [not found]             ` <5106FE77.3030001-mnsaURCQ41sdnm+yROfE0A@public.gmane.org>
2013-01-29 20:18               ` Matt Fleming
2013-01-29  3:30           ` Lingzhu Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5106FE77.3030001@ozlabs.org \
    --to=jk-mnsaurcq41sdnm+yrofe0a@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lxiang-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.