]> wimlib.net Git - wimlib/commitdiff
wimfs_readlink(): Return -EINVAL if buf_len == 0, not -ENAMETOOLONG
authorEric Biggers <ebiggers3@gmail.com>
Sun, 12 Jan 2014 06:37:08 +0000 (00:37 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 12 Jan 2014 06:37:08 +0000 (00:37 -0600)
src/mount_image.c

index d8a94296ee915779e4e0c608613d9e1ecda479dc..1a8443e3f6d6c36533af7c0b91f23afa49ca16b4 100644 (file)
@@ -2031,7 +2031,7 @@ wimfs_readlink(const char *path, char *buf, size_t buf_len)
        if (!inode_is_symlink(inode))
                return -EINVAL;
        if (buf_len == 0)
-               return -ENAMETOOLONG;
+               return -EINVAL;
        ret = wim_inode_readlink(inode, buf, buf_len - 1, NULL);
        if (ret >= 0) {
                wimlib_assert(ret <= buf_len - 1);