monitor_read_bdrv_key_start(mon, bs, NULL, NULL);
}
-static void change_vnc_password_cb(Monitor *mon, const char *password,
- void *opaque)
+static void change_vnc_password(Monitor *mon, const char *password)
{
if (vnc_display_password(NULL, password) < 0)
monitor_printf(mon, "could not set VNC server password\n");
+}
+
+static void change_vnc_password_cb(Monitor *mon, const char *password,
+ void *opaque)
+{
+ change_vnc_password(mon, password);
monitor_read_command(mon, 1);
}
char password[9];
strncpy(password, arg, sizeof(password));
password[sizeof(password) - 1] = '\0';
- change_vnc_password_cb(mon, password, NULL);
+ change_vnc_password(mon, password);
} else {
monitor_read_password(mon, change_vnc_password_cb, NULL);
}