• M
    efivarfs: Never return ENOENT from firmware · 1fa7e695
    Matt Fleming 提交于
    Files are created in efivarfs_create() before a corresponding variable
    is created in the firmware. This leads to users being able to
    read/write to the file without the variable existing in the
    firmware. Reading a non-existent variable currently returns -ENOENT,
    which is confusing because the file obviously *does* exist.
    
    Convert EFI_NOT_FOUND into -EIO which is the closest thing to "error
    while interacting with firmware", and should hopefully indicate to the
    caller that the variable is in some uninitialised state.
    
    Cc: Josh Boyer <jwboyer@redhat.com>
    Acked-by: NJeremy Kerr <jeremy.kerr@canonical.com>
    Cc: Lee, Chun-Yi <jlee@suse.com>
    Cc: Andy Whitcroft <apw@canonical.com>
    Reported-by: NLingzhu Xiang <lxiang@redhat.com>
    Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
    1fa7e695
efivars.c 45.1 KB