]> git.proxmox.com Git - mirror_qemu.git/blobdiff - qemu-nbd.c
acpi/tests/avocado/bits/doc: add a doc file to describe the acpi bits test
[mirror_qemu.git] / qemu-nbd.c
index db63980df1e4bfce35f990ab7820a4bd66759176..0cd5aa6f02bc2c0b4d8deb6257cbb6a7469daf8b 100644 (file)
@@ -909,13 +909,14 @@ int main(int argc, char **argv)
 
     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);
         }
 
@@ -1094,7 +1095,7 @@ int main(int argc, char **argv)
 
     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) {