Revision 2569da0c
b/monitor.c | ||
---|---|---|
429 | 429 |
qemu_key_check(bs, filename); |
430 | 430 |
} |
431 | 431 |
|
432 |
static void do_change_vnc(const char *target) |
|
432 |
static void do_change_vnc(const char *target, const char *arg)
|
|
433 | 433 |
{ |
434 | 434 |
if (strcmp(target, "passwd") == 0 || |
435 | 435 |
strcmp(target, "password") == 0) { |
436 | 436 |
char password[9]; |
437 |
monitor_readline("Password: ", 1, password, sizeof(password)); |
|
437 |
if (arg) { |
|
438 |
strncpy(password, arg, sizeof(password)); |
|
439 |
password[sizeof(password) - 1] = '\0'; |
|
440 |
} else |
|
441 |
monitor_readline("Password: ", 1, password, sizeof(password)); |
|
438 | 442 |
if (vnc_display_password(NULL, password) < 0) |
439 | 443 |
term_printf("could not set VNC server password\n"); |
440 | 444 |
} else { |
... | ... | |
443 | 447 |
} |
444 | 448 |
} |
445 | 449 |
|
446 |
static void do_change(const char *device, const char *target, const char *fmt)
|
|
450 |
static void do_change(const char *device, const char *target, const char *arg)
|
|
447 | 451 |
{ |
448 | 452 |
if (strcmp(device, "vnc") == 0) { |
449 |
do_change_vnc(target); |
|
453 |
do_change_vnc(target, arg);
|
|
450 | 454 |
} else { |
451 |
do_change_block(device, target, fmt);
|
|
455 |
do_change_block(device, target, arg);
|
|
452 | 456 |
} |
453 | 457 |
} |
454 | 458 |
|
b/qemu-doc.texi | ||
---|---|---|
1241 | 1241 |
(qemu) change vnc localhost:1 |
1242 | 1242 |
@end example |
1243 | 1243 |
|
1244 |
@item change vnc password |
|
1244 |
@item change vnc password [@var{password}]
|
|
1245 | 1245 |
|
1246 |
Change the password associated with the VNC server. The monitor will prompt for
|
|
1247 |
the new password to be entered. VNC passwords are only significant upto 8 letters.
|
|
1248 |
eg.
|
|
1246 |
Change the password associated with the VNC server. If the new password is not
|
|
1247 |
supplied, the monitor will prompt for it to be entered. VNC passwords are only
|
|
1248 |
significant up to 8 letters. eg
|
|
1249 | 1249 |
|
1250 | 1250 |
@example |
1251 | 1251 |
(qemu) change vnc password |
Also available in: Unified diff