• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

よく使われているワード(クリックで追加)

javaandroidc++linuxc#windowsobjective-ccocoaqtpython誰得phprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

FreeBSD bhyve keyboard layout patch


コミットメタ情報

リビジョン64183a6152c17fb4bcafcaef1acb6be81400e886 (tree)
日時2021-05-03 23:00:42
作者Koine Yuusuke(koinec) <koinec@user...>
コミッターKoine Yuusuke(koinec)

ログメッセージ

* Change keyboard layout specification option to "-K" (uppercase K). (Because "-k" is used for other purposes in FreeBSD current's bhyve)
* Fix the following issues on the FreeBSD review site. (Corrected the violation of man's notation rule by incorporating the content of the proposal on the review side.) (https://reviews.freebsd.org/D29473)

変更サマリ

差分

--- a/kbdlayout_option/bhyve_kbdlayout_option_fbsd122r.patch
+++ b/kbdlayout_option/bhyve_kbdlayout_option_fbsd122r.patch
@@ -1,6 +1,6 @@
11 diff -uprN bhyve_orig/Makefile bhyve/Makefile
22 --- bhyve_orig/Makefile 2020-10-23 09:02:29.000000000 +0900
3-+++ bhyve/Makefile 2020-12-30 15:37:58.795173000 +0900
3++++ bhyve/Makefile 2021-05-03 22:14:14.502876000 +0900
44 @@ -95,4 +95,6 @@ CFLAGS+=-DGDB_LOG
55
66 WARNS?= 2
@@ -10,32 +10,33 @@ diff -uprN bhyve_orig/Makefile bhyve/Makefile
1010 .include <bsd.prog.mk>
1111 diff -uprN bhyve_orig/bhyve.8 bhyve/bhyve.8
1212 --- bhyve_orig/bhyve.8 2020-10-23 09:02:29.000000000 +0900
13-+++ bhyve/bhyve.8 2020-12-30 15:37:58.795903000 +0900
13++++ bhyve/bhyve.8 2021-05-03 22:14:50.353899000 +0900
1414 @@ -47,6 +47,7 @@
1515 .Sm on
1616 .Op Fl G Ar port
1717 .Op Fl g Ar gdbport
18-+.Op Fl k Ar layout
18++.Op Fl K Ar layout
1919 .Oo Fl l
2020 .Sm off
2121 .Cm help | Ar lpcdev Op Cm \&, Ar conf
22-@@ -163,6 +164,13 @@ Print help message and exit.
22+@@ -163,6 +164,14 @@ Print help message and exit.
2323 .It Fl H
2424 Yield the virtual CPU thread when a HLT instruction is detected.
2525 If this option is not specified, virtual CPUs will use 100% of a host CPU.
26-+.It Fl k Ar layout
26++.It Fl K Ar layout
2727 +Specify the keyboard layout.
2828 +The value that can be specified sets the file name in
2929 +.Ar /usr/share/bhyve/kbdlayout .
30-+This specification only works when loaded with UEFI mode.(Not working via console or SSH)
31-+If you are using a VNC client that supports QEMU Extended Key Event Message (e.g. TigerVNC), don't need to specify this option.
32-+If you are using a VNC client that doesn't support it(e.g. tightVNC), and you don't specify this option, the US keyboard layout(default) is specified.
30++This specification only works when loaded with UEFI mode for VNC.
31++(Not working via serial console or SSH)
32++When using a VNC client that supports QEMU Extended Key Event Message (e.g. TigerVNC), this option isn't needed.
33++When using a VNC client that doesn't support QEMU Extended Key Event Message (e.g. tightVNC), the default layout defaults to the US keyboard unless specified otherwise.
3334 .It Fl l Op Ar help|lpcdev Ns Op , Ns Ar conf
3435 Allow devices behind the LPC PCI-ISA bridge to be configured.
3536 The only supported devices are the TTY-class devices
3637 diff -uprN bhyve_orig/bhyverun.c bhyve/bhyverun.c
3738 --- bhyve_orig/bhyverun.c 2020-10-23 09:02:29.000000000 +0900
38-+++ bhyve/bhyverun.c 2020-12-30 15:37:58.796864000 +0900
39++++ bhyve/bhyverun.c 2021-05-03 22:14:14.504885000 +0900
3940 @@ -165,6 +165,8 @@ char *vmname;
4041 int guest_ncpus;
4142 uint16_t cores, maxcpus, sockets, threads;
@@ -50,7 +51,7 @@ diff -uprN bhyve_orig/bhyverun.c bhyve/bhyverun.c
5051 "Usage: %s [-abehuwxACDHPSWY]\n"
5152 " %*s [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]\n"
5253 - " %*s [-g <gdb port>] [-l <lpc>]\n"
53-+ " %*s [-g <gdb port>] [-k layout] [-l <lpc>]\n"
54++ " %*s [-g <gdb port>] [-K layout] [-l <lpc>]\n"
5455 " %*s [-m mem] [-p vcpu:hostcpu] [-s <pci>] [-U uuid] <vm>\n"
5556 " -a: local apic is in xAPIC mode (deprecated)\n"
5657 " -A: create ACPI tables\n"
@@ -58,7 +59,7 @@ diff -uprN bhyve_orig/bhyverun.c bhyve/bhyverun.c
5859 " -g: gdb port\n"
5960 " -h: help\n"
6061 " -H: vmexit from the guest on hlt\n"
61-+ " -k: PS2 keyboard layout\n"
62++ " -K: PS2 keyboard layout\n"
6263 " -l: LPC device configuration\n"
6364 " -m: memory size in MB\n"
6465 " -p: pin 'vcpu' to 'hostcpu'\n"
@@ -69,7 +70,7 @@ diff -uprN bhyve_orig/bhyverun.c bhyve/bhyverun.c
6970 + kbdlayout_name = NULL;
7071
7172 - optstr = "abehuwxACDHIPSWYp:g:G:c:s:m:l:U:";
72-+ optstr = "abehuwxACDHIPSWYp:g:G:c:s:m:l:k:U:";
73++ optstr = "abehuwxACDHIPSWYp:g:G:c:s:m:l:K:U:";
7374 while ((c = getopt(argc, argv, optstr)) != -1) {
7475 switch (c) {
7576 case 'a':
@@ -78,14 +79,14 @@ diff -uprN bhyve_orig/bhyverun.c bhyve/bhyverun.c
7879 }
7980 gdb_port = atoi(optarg);
8081 + break;
81-+ case 'k':
82++ case 'K':
8283 + kbdlayout_name = optarg;
8384 break;
8485 case 'l':
8586 if (strncmp(optarg, "help", strlen(optarg)) == 0) {
8687 diff -uprN bhyve_orig/bhyverun.h bhyve/bhyverun.h
8788 --- bhyve_orig/bhyverun.h 2020-10-23 09:02:29.000000000 +0900
88-+++ bhyve/bhyverun.h 2020-12-30 15:37:58.797234000 +0900
89++++ bhyve/bhyverun.h 2021-05-03 22:14:14.505299000 +0900
8990 @@ -39,6 +39,7 @@ extern int guest_ncpus;
9091 extern uint16_t cores, sockets, threads;
9192 extern char *guest_uuid_str;
@@ -96,7 +97,7 @@ diff -uprN bhyve_orig/bhyverun.h bhyve/bhyverun.h
9697
9798 diff -uprN bhyve_orig/ps2kbd.c bhyve/ps2kbd.c
9899 --- bhyve_orig/ps2kbd.c 2020-10-23 09:02:29.000000000 +0900
99-+++ bhyve/ps2kbd.c 2020-12-30 15:37:58.797949000 +0900
100++++ bhyve/ps2kbd.c 2021-05-03 22:14:14.506115000 +0900
100101 @@ -31,15 +31,20 @@
101102 __FBSDID("$FreeBSD: releng/12.2/usr.sbin/bhyve/ps2kbd.c 358184 2020-02-20 21:48:36Z vmaffione $");
102103