mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/virt-viewer
synced 2026-01-07 11:24:16 +00:00
virt-viewer-main: '--wait' should not be used without domain name
Commit a830275344 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
This commit is contained in:
parent
d71c2a673d
commit
69a5077a8a
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user