summaryrefslogtreecommitdiff
path: root/libkms
diff options
context:
space:
mode:
authorMaxime Villard <rustyBSD@gmx.fr>2013-01-02 10:57:07 -0500
committerJerome Glisse <jglisse@redhat.com>2013-01-02 10:57:07 -0500
commitbaf0a7daafc7636106e1b19267ed22e22b1a2283 (patch)
treea43235221bb5f236d0f23c2710051859ec24e991 /libkms
parent1f4b5e11e638fc87bd0ac8e3530b407211b76d45 (diff)
libkms: return -EINVAL on fstat error
On error fstat return -1, instead return -EINVAL to caller Signed-off-by: Maxime Villard <rustyBSD@gmx.fr> Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Diffstat (limited to 'libkms')
-rw-r--r--libkms/linux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkms/linux.c b/libkms/linux.c
index fc4f205c..eec01622 100644
--- a/libkms/linux.c
+++ b/libkms/linux.c
@@ -68,7 +68,7 @@ linux_name_from_sysfs(int fd, char **out)
ret = fstat(fd, &buffer);
if (ret)
- return ret;
+ return -EINVAL;
if (!S_ISCHR(buffer.st_mode))
return -EINVAL;