goto out;
}
- ret = nbd_receive_negotiate(QIO_CHANNEL(sioc),
+ ret = nbd_receive_negotiate(NULL, QIO_CHANNEL(sioc),
NULL, NULL, NULL, &info, &local_error);
if (ret < 0) {
if (local_error) {
exit(EXIT_FAILURE);
} else if (pid == 0) {
close(stderr_fd[0]);
+
+ old_stderr = dup(STDERR_FILENO);
ret = qemu_daemon(1, 0);
/* Temporarily redirect stderr to the parent's pipe... */
- old_stderr = dup(STDERR_FILENO);
dup2(stderr_fd[1], STDERR_FILENO);
if (ret < 0) {
error_report("Failed to daemonize: %s", strerror(errno));