diff options
author | Pavel Grunt <pgrunt@redhat.com> | 2015-04-14 17:06:35 +0200 |
---|---|---|
committer | Pavel Grunt <pgrunt@redhat.com> | 2015-04-14 18:22:01 +0200 |
commit | 69a5077a8ab99c3c83d73d81fbe1f29a46d4fdb8 (patch) | |
tree | 3b3c897267e603d73f3c774f1323aec5b5f46263 /src/virt-viewer-main.c | |
parent | d71c2a673db4f647ff961fbd1add64216dd84c03 (diff) | |
download | virt-viewer-69a5077a8ab99c3c83d73d81fbe1f29a46d4fdb8.tar.gz virt-viewer-69a5077a8ab99c3c83d73d81fbe1f29a46d4fdb8.tar.xz virt-viewer-69a5077a8ab99c3c83d73d81fbe1f29a46d4fdb8.zip |
virt-viewer-main: '--wait' should not be used without domain name
Commit a830275344c88aef12166661b68ea2b4429c7212 required the domain
name to be placed just after the '--wait' option. It broke the
command line api, because running 'virt-viewer $vm --wait' was considered
as the error.
This patch rather checks whether the domain name was specified.
Related: rhbz#1209398, rhbz#1211573
Diffstat (limited to 'src/virt-viewer-main.c')
-rw-r--r-- | src/virt-viewer-main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/virt-viewer-main.c b/src/virt-viewer-main.c index af1251e..505b472 100644 --- a/src/virt-viewer-main.c +++ b/src/virt-viewer-main.c @@ -108,6 +108,11 @@ int main(int argc, char **argv) goto cleanup; } + if (args == NULL && waitvm) { + g_printerr(_("\nNo DOMAIN-NAME|ID|UUID was specified for '--wait'\n\n")); + goto cleanup; + } + viewer = virt_viewer_new(uri, (args) ? args[0] : NULL, direct, attach, waitvm, reconnect); if (viewer == NULL) goto cleanup; |