diff options
author | Peter Lieven <pl@kamp.de> | 2014-03-17 09:37:21 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-03-19 09:39:41 +0100 |
commit | 20fccb187c54105177a7859360e3cb7166c8f22f (patch) | |
tree | a67bad30236496de42ed804409cafe08a2dc0abd | |
parent | b7d769c93214bd6e58d16009f47e61ccb541025c (diff) |
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 <pl@kamp.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | block/nfs.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |