]> xenbits.xensource.com Git - libvirt.git/commitdiff
admin: Fix default uri config option name s/admin_uri_default/uri_default
authorErik Skultety <eskultet@redhat.com>
Wed, 27 Jul 2016 11:23:03 +0000 (13:23 +0200)
committerErik Skultety <eskultet@redhat.com>
Fri, 29 Jul 2016 07:21:09 +0000 (09:21 +0200)
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@redhat.com>
src/libvirt-admin.c
tools/virt-admin.pod

index 859f9378012eafbd1b714a9d083cab7047e184b5..4bf29b14a4cb2d4ee45d93b81dc8b73d304d85e3 100644 (file)
@@ -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) {
index 2765bc5cb0759dd9a025a3f4411824b57d22957c..2199038e2f63f21ad0d460f4f6b521ffec1246f2 100644 (file)
@@ -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