19/22 Disable unix, ssh and ext transports in Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



.. because it's a lot simpler than actually implementing them. The user will see an error message to this effect if they try to use them.

Rich.

--
Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903
Index: src/remote_internal.c
===================================================================
RCS file: /data/cvs/libvirt/src/remote_internal.c,v
retrieving revision 1.44
diff -u -r1.44 remote_internal.c
--- src/remote_internal.c	6 Dec 2007 12:05:35 -0000	1.44
+++ src/remote_internal.c	7 Dec 2007 11:01:34 -0000
@@ -207,6 +227,7 @@
     return NULL;
 }
 
+#ifndef WIN32
 /**
  * qemuForkDaemon:
  *
@@ -286,7 +307,7 @@
 
     return (0);
 }
-
+#endif
 
 enum virDrvOpenRemoteFlags {
     VIR_DRV_OPEN_REMOTE_RO = (1 << 0),
@@ -554,6 +577,7 @@
         break;
     }
 
+#ifndef WIN32
     case trans_unix: {
         if (!sockname) {
             if (flags & VIR_DRV_OPEN_REMOTE_USER) {
@@ -720,6 +744,16 @@
         priv->sock = sv[0];
         priv->pid = pid;
     }
+#else /* WIN32 */
+
+    case trans_unix:
+    case trans_ssh:
+    case trans_ext:
+        error (conn, VIR_ERR_INVALID_ARG,
+               _("transport methods unix, ssh and ext are not supported under Windows"));
+
+#endif /* WIN32 */
+
     } /* switch (transport) */
 
 
@@ -769,6 +803,7 @@
             gnutls_deinit (priv->session);
         }
         close (priv->sock);
+#ifndef WIN32
         if (priv->pid > 0) {
             pid_t reap;
             do {
@@ -777,6 +812,7 @@
                     continue;
             } while (reap != -1 && reap != priv->pid);
         }
+#endif
     }
 
     if (priv->hostname) {
@@ -808,6 +844,7 @@
     if (flags & VIR_CONNECT_RO)
         rflags |= VIR_DRV_OPEN_REMOTE_RO;
 
+#if WITH_QEMU
     if (uri &&
         uri->scheme && STREQ (uri->scheme, "qemu") &&
         (!uri->server || STREQ (uri->server, "")) &&
@@ -822,6 +859,7 @@
             }
         }
     }
+#endif
 
     memset(priv, 0, sizeof(struct private_data));
     priv->magic = DEAD;
@@ -1306,6 +1344,7 @@
 #endif
     close (priv->sock);
 
+#ifndef WIN32
     if (priv->pid > 0) {
         pid_t reap;
         do {
@@ -1314,6 +1353,7 @@
                 continue;
         } while (reap != -1 && reap != priv->pid);
     }
+#endif
 
     /* Free hostname copy */
     if (priv->hostname) free (priv->hostname);

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]