From 20fccb187c54105177a7859360e3cb7166c8f22f Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Mon, 17 Mar 2014 09:37:21 +0100 Subject: block/nfs: report errors from libnfs if an NFS operation fails we should report what libnfs knows about the failure. It is likely more than just an error code. Signed-off-by: Peter Lieven Signed-off-by: Kevin Wolf --- block/nfs.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'block/nfs.c') diff --git a/block/nfs.c b/block/nfs.c index ef731f04e3..98aa363e48 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -112,6 +112,9 @@ nfs_co_generic_cb(int ret, struct nfs_context *nfs, void *data, if (task->ret == 0 && task->st) { memcpy(task->st, data, sizeof(struct stat)); } + if (task->ret < 0) { + error_report("NFS Error: %s", nfs_get_error(nfs)); + } if (task->co) { task->bh = qemu_bh_new(nfs_co_generic_bh_cb, task); qemu_bh_schedule(task->bh); -- cgit v1.2.3