summaryrefslogtreecommitdiff
path: root/src/shared/efivars.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-21 20:55:17 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-21 22:39:24 -0400
commit742af54adce09e019b37093af66b2f22b4ae9330 (patch)
treea8a1a79ffb57fde124ea3b6be3d40c3752563bd5 /src/shared/efivars.c
parent7a4b2eab6d1d0e4b67cbcb87b84588edd34aabb5 (diff)
efivars: fix return code
Was returning 1 on read error.
Diffstat (limited to 'src/shared/efivars.c')
-rw-r--r--src/shared/efivars.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index 4fb77428f2..06cf127de1 100644
--- a/src/shared/efivars.c
+++ b/src/shared/efivars.c
@@ -111,7 +111,7 @@ int efi_get_variable(
n = read(fd, r, (size_t) st.st_size - 4);
if (n < 0) {
free(r);
- return (int) -n;
+ return -errno;
}
if (n != (ssize_t) st.st_size - 4) {
free(r);