Il 18/09/2012 21:06, Luiz Capitulino ha scritto: > + fd = monitor_get_fd(cur_mon, fdname); > + if (fd < 0) { > + error_setg(errp, "file-description '%s' has not been found", fdname); > + return; > + }
Please change this to add an Error * argument to monitor_get_fd, and change non-Error-friendly callers of monitor_get_fd to monitor_handle_fd_param. You can then reuse the error in monitor_handle_fd_param (there is already QERR_FD_NOT_FOUND, by the way). I'll post the patches later in my reviewed NBD series, please take them from there and I'll rebase before my pull request. Paolo