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

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>
This commit is contained in:
Erik Skultety 2016-07-27 13:23:03 +02:00
parent 98aefa813d
commit f5f32bcd1b
2 changed files with 5 additions and 4 deletions

View File

@ -167,7 +167,7 @@ virAdmGetDefaultURI(virConfPtr conf, char **uristr)
return -1; return -1;
VIR_DEBUG("Using LIBVIRT_ADMIN_DEFAULT_URI '%s'", *uristr); VIR_DEBUG("Using LIBVIRT_ADMIN_DEFAULT_URI '%s'", *uristr);
} else { } else {
if (virConfGetValueString(conf, "admin_uri_default", uristr) < 0) if (virConfGetValueString(conf, "uri_default", uristr) < 0)
return -1; return -1;
if (*uristr) { if (*uristr) {

View File

@ -127,7 +127,7 @@ Will print the current directory.
(Re)-Connect to a daemon's administrating server. The I<URI> parameter (Re)-Connect to a daemon's administrating server. The I<URI> parameter
specifies how to connect to the administrating server. 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 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 active connection is executed. Note that this only applies if there is no
connection at all or there is an inactive one. 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> =item B<uri>
Prints the administrating server canonical URI, can be useful in shell mode. If 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 no I<uri> was specified, neither I<LIBVIRT_ADMIN_DEFAULT_URI> environment
I<admin_uri_default> were set, libvirtd:///system is used. variable nor I<uri_default> option (libvirt-admin.conf) were set,
libvirtd:///system is used.
=back =back