From 69bb42789a05d2dbc9a7a80e0153333cc62c382d 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 --- virtio/9p.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtio/9p.c b/virtio/9p.c index 6c115ff..99279f1 100644 --- a/virtio/9p.c +++ b/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; }