[PATCH] admin: Fix default uri config option name s/admin_uri_default/uri_default

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

 



The original name 'admin_uri_default' was introduced to our code by commit
dbecb87f. However, at that time we already had a separate config file for
admin library but the commit mentioned above didn't properly adjust the
config's option name. The result is that when we're loading the config, we
check a non-existent config option (there's not much to do with the URIs
anyway, since we only allow local connection). Additionally, virt-admin's man
page documents, that the default URI can be altered by setting
admin_uri_default option. So the fix proposed by this patch leaves the
libvirt-admin.conf as is and adjusts the naming in the code as well as in the
virt-admin's man page.

Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
---
 src/libvirt-admin.c  | 2 +-
 tools/virt-admin.pod | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/libvirt-admin.c b/src/libvirt-admin.c
index 859f937..4bf29b1 100644
--- a/src/libvirt-admin.c
+++ b/src/libvirt-admin.c
@@ -167,7 +167,7 @@ virAdmGetDefaultURI(virConfPtr conf, char **uristr)
             return -1;
         VIR_DEBUG("Using LIBVIRT_ADMIN_DEFAULT_URI '%s'", *uristr);
     } else {
-        if (virConfGetValueString(conf, "admin_uri_default", uristr) < 0)
+        if (virConfGetValueString(conf, "uri_default", uristr) < 0)
             return -1;
 
         if (*uristr) {
diff --git a/tools/virt-admin.pod b/tools/virt-admin.pod
index 2765bc5..2199038 100644
--- a/tools/virt-admin.pod
+++ b/tools/virt-admin.pod
@@ -127,7 +127,7 @@ Will print the current directory.
 
 (Re)-Connect to a daemon's administrating server. The I<URI> parameter
 specifies how to connect to the administrating server.
-If I<LIBVIRT_ADMIN_DEFAULT_URI> or I<admin_uri_default> (see below) were set,
+If I<LIBVIRT_ADMIN_DEFAULT_URI> or I<uri_default> (see below) were set,
 I<connect> is automatically issued every time a command that requires an
 active connection is executed. Note that this only applies if there is no
 connection at all or there is an inactive one.
@@ -137,8 +137,9 @@ To find the currently used URI, check the I<uri> command documented below.
 =item B<uri>
 
 Prints the administrating server canonical URI, can be useful in shell mode. If
-no I<uri> was specified, neither I<LIBVIRT_ADMIN_DEFAULT_URI> or
-I<admin_uri_default> were set, libvirtd:///system is used.
+no I<uri> was specified, neither I<LIBVIRT_ADMIN_DEFAULT_URI> environment
+variable nor I<uri_default> option (libvirt-admin.conf) were set,
+libvirtd:///system is used.
 
 =back
 
-- 
2.5.5

--
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]