if ((device && !verbose) || fork_process) {
#ifndef WIN32
+ g_autoptr(GError) err = NULL;
int stderr_fd[2];
pid_t pid;
int ret;
- if (qemu_pipe(stderr_fd) < 0) {
+ if (!g_unix_open_pipe(stderr_fd, FD_CLOEXEC, &err)) {
error_report("Error setting up communication pipe: %s",
- strerror(errno));
+ err->message);
exit(EXIT_FAILURE);
}
bs->detect_zeroes = detect_zeroes;
- nbd_server_is_qemu_nbd(true);
+ nbd_server_is_qemu_nbd(shared);
export_opts = g_new(BlockExportOptions, 1);
*export_opts = (BlockExportOptions) {
.has_writable = true,
.writable = !readonly,
.u.nbd = {
- .has_name = true,
.name = g_strdup(export_name),
- .has_description = !!export_description,
.description = g_strdup(export_description),
.has_bitmaps = !!bitmaps,
.bitmaps = bitmaps,