Previously in 1fa7e695 efi_status_to_err() translated firmware status
EFI_NOT_FOUND to -EIO instead of -ENOENT for efivarfs operations to
avoid confusion. After refactoring in e14ab23d, it is also used in other
places where the translation may be unnecessary.
So move the translation to efivarfs specific code. Also return EOF
for reading zero-length files, which is what users would expect.
Cc: Josh Boyer <firstname.lastname@example.org>
Cc: Jeremy Kerr <email@example.com>
Cc: Lee, Chun-Yi <firstname.lastname@example.org>
Cc: Andy Whitcroft <email@example.com>
Signed-off-by: Lingzhu Xiang <firstname.lastname@example.org>
Signed-off-by: Matt Fleming <email@example.com>