6/22 Disable console under MinGW

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

 



Under MinGW we don't have anything like termcap. This disables the console in virsh, replacing "virsh console" with an error message.

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/console.c
===================================================================
RCS file: /data/cvs/libvirt/src/console.c,v
retrieving revision 1.3
diff -u -r1.3 console.c
--- src/console.c	26 Nov 2007 12:14:32 -0000	1.3
+++ src/console.c	7 Dec 2007 10:43:13 -0000
@@ -22,6 +22,8 @@
 
 #include "config.h"
 
+#ifndef __MINGW32__
+
 #include <stdio.h>
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -193,6 +195,8 @@
     return ret;
 }
 
+#endif /* !__MINGW32__ */
+
 /*
  * Local variables:
  *  indent-tabs-mode: nil
Index: src/console.h
===================================================================
RCS file: /data/cvs/libvirt/src/console.h,v
retrieving revision 1.2
diff -u -r1.2 console.h
--- src/console.h	28 Jan 2007 19:47:36 -0000	1.2
+++ src/console.h	7 Dec 2007 10:43:13 -0000
@@ -23,6 +23,8 @@
 #ifndef __VIR_CONSOLE_H__
 #define __VIR_CONSOLE_H__
 
+#ifndef __MINGW32__
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -33,6 +35,8 @@
 }
 #endif
 
+#endif /* !__MINGW32__ */
+
 #endif /* __VIR_CONSOLE_H__ */
 
 /*
Index: src/virsh.c
===================================================================
RCS file: /data/cvs/libvirt/src/virsh.c,v
retrieving revision 1.118
diff -u -r1.118 virsh.c
--- src/virsh.c	6 Dec 2007 16:36:21 -0000	1.118
+++ src/virsh.c	7 Dec 2007 10:43:16 -0000
@@ -457,6 +459,8 @@
     {NULL, 0, 0, NULL}
 };
 
+#ifndef __MINGW32__
+
 static int
 cmdConsole(vshControl * ctl, vshCmd * cmd)
 {
@@ -506,6 +510,17 @@
     return ret;
 }
 
+#else /* __MINGW32__ */
+
+static int
+cmdConsole(vshControl * ctl, vshCmd * cmd ATTRIBUTE_UNUSED)
+{
+    vshError (ctl, FALSE, _("console not implemented on Win32"));
+    return FALSE;
+}
+
+#endif /* __MINGW32__ */
+
 /*
  * "list" command
  */

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]