]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm tools: use correct error value for virtio-9p RLERROR
authorSasha Levin <levinsasha928@gmail.com>
Sun, 22 Jul 2012 16:29:53 +0000 (18:29 +0200)
committerPekka Enberg <penberg@kernel.org>
Tue, 31 Jul 2012 06:25:02 +0000 (09:25 +0300)
RLERROR expects positive error values, passing negative values causes guest kernel
panic.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
tools/kvm/virtio/9p.c

index 6c115ff0f0a1b282190f122298dfbc0e6043ee89..99279f19ead1fddd2e0502139d43649298881e49 100644 (file)
@@ -548,7 +548,7 @@ static void virtio_p9_readdir(struct p9_dev *p9dev,
        fid = get_fid(p9dev, fid_val);
 
        if (!fid->is_dir) {
-               errno = -EINVAL;
+               errno = EINVAL;
                goto err_out;
        }