Improve qrexec protocol mismatch error dialog

- only have one button, because "yes/no" makes no sense in this context
- inform use to use "-t pv" for xl console, because otherwise it won't
  work for HVM domains.
- use the actual VM name, not "vmname"
pull/34/head mm_c69662eb
Jean-Philippe Ouellet 7 years ago
parent be9e759697
commit c69662eb28
No known key found for this signature in database
GPG Key ID: 4747332C27533622

@ -167,16 +167,16 @@ static void incompatible_protocol_error_message(
int ret;
struct stat buf;
ret=stat("/usr/bin/kdialog", &buf);
#define KDIALOG_CMD "kdialog --title 'Qrexec daemon' --warningyesno "
#define ZENITY_CMD "zenity --title 'Qrexec daemon' --question --text "
#define KDIALOG_CMD "kdialog --title 'Qrexec daemon' --sorry "
#define ZENITY_CMD "zenity --title 'Qrexec daemon' --warning --text "
snprintf(text, sizeof(text),
"%s"
"'Domain %s uses incompatible qrexec protocol (%d instead of %d). "
"You need to update either dom0 or VM packages.\n"
"To access this VM console do not close this error message and call:\n"
"sudo xl console vmname'",
"To access this VM console do not close this error message and run:\n"
"sudo xl console -t pv %s'",
ret==0 ? KDIALOG_CMD : ZENITY_CMD,
domain_name, remote_version, QREXEC_PROTOCOL_VERSION);
domain_name, remote_version, QREXEC_PROTOCOL_VERSION, domain_name);
#undef KDIALOG_CMD
#undef ZENITY_CMD
system(text);

Loading…
Cancel
Save