summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2009-12-04 18:44:57 +0100
committerKarel Zak2009-12-04 18:44:57 +0100
commitfc31c7e5b2a2019f64287ad38678e7442053c0d9 (patch)
tree1230f1917ae7f97c1a469861171d2938dd55c3da
parentbuild-sys: rewrite TLS detection (diff)
downloadkernel-qcow2-util-linux-fc31c7e5b2a2019f64287ad38678e7442053c0d9.tar.gz
kernel-qcow2-util-linux-fc31c7e5b2a2019f64287ad38678e7442053c0d9.tar.xz
kernel-qcow2-util-linux-fc31c7e5b2a2019f64287ad38678e7442053c0d9.zip
libblkid: fix blkid_fstatat() code
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--shlibs/blkid/src/devno.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shlibs/blkid/src/devno.c b/shlibs/blkid/src/devno.c
index f48f26ecb..7b9438ff7 100644
--- a/shlibs/blkid/src/devno.c
+++ b/shlibs/blkid/src/devno.c
@@ -99,8 +99,8 @@ int blkid_fstatat(DIR *dir, const char *dirname, const char *filename,
char device[PATH_MAX];
int len;
- len = snprintf(device, sizeof(device), "%s/%s", *dirname, name);
- if (len < 0 || len + 1 > sizeof(path))
+ len = snprintf(device, sizeof(device), "%s/%s", dirname, filename);
+ if (len < 0 || len + 1 > sizeof(device))
return -1;
return nofollow ? lstat(device, st) : stat(device, st);