From 427dad4b0f99270b6d0ef1f3d24818cb1320a478 Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Sun, 22 Jul 2012 18:29:53 +0200 Subject: [PATCH] kvm tools: use correct error value for virtio-9p RLERROR RLERROR expects positive error values, passing negative values causes guest kernel panic. Signed-off-by: Sasha Levin Signed-off-by: Pekka Enberg --- tools/kvm/virtio/9p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kvm/virtio/9p.c b/tools/kvm/virtio/9p.c index 6c115ff0f0a1..99279f19ead1 100644 --- a/tools/kvm/virtio/9p.c +++ b/tools/kvm/virtio/9p.c @@ -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; } -- 2.39.5