[libvirt] [PATCH v2 2/3] virsh: Prohibit virConnectOpen* functions in virsh

Martin Kletzander mkletzan at redhat.com
Mon Mar 10 11:26:58 UTC 2014


Addition of vshConnect() makes virConnectOpen() functions obsolete in
virsh.  Thus all virsh-*.[ch] files should be left only with
vshConnect() in the case of need.

Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
---
 cfg.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/cfg.mk b/cfg.mk
index 2a8957a..25446ac 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -1,5 +1,5 @@
 # Customize Makefile.maint.                           -*- makefile -*-
-# Copyright (C) 2008-2013 Red Hat, Inc.
+# Copyright (C) 2008-2014 Red Hat, Inc.
 # Copyright (C) 2003-2008 Free Software Foundation, Inc.

 # This program is free software: you can redistribute it and/or modify
@@ -863,6 +863,12 @@ sc_prohibit_atoi:
 	halt='Use virStrToLong* instead of atoi, atol, atof, atoq, atoll' \
 	  $(_sc_search_regexp)

+sc_prohibit_virConnectOpen_in_virsh:
+	@prohibit='\bvirConnectOpen[a-zA-Z]* *\('                       \
+	in_vc_files='^tools/virsh-.*\.[ch]$$'                            \
+	halt='Use vshConnect() in virsh instead of virConnectOpen*'     \
+	  $(_sc_search_regexp)
+

 # We don't use this feature of maint.mk.
 prev_version_file = /dev/null
-- 
1.9.0




More information about the libvir-list mailing list