• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

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

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

FreeBSD bhyve keyboard layout patch


コミットメタ情報

リビジョンe5fa1dd331f6b810e2c74a75fea1ab80381d50f3 (tree)
日時2021-05-03 22:45:35
作者Koine Yuusuke(koinec) <koinec@user...>
コミッターKoine Yuusuke(koinec)

ログメッセージ

* Update for FreeBSD 13.0-RELEASE.(Along with this, the patch filename was changed)
* 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)

変更サマリ

  • delete: kbdlayout_option/{bhyve_kbdlayout_option_fbsd13c.patch => bhyve_kbdlayout_option_fbsd130r.patch}

差分

--- a/kbdlayout_option/bhyve_kbdlayout_option_fbsd13c.patch
+++ b/kbdlayout_option/bhyve_kbdlayout_option_fbsd130r.patch
@@ -1,7 +1,7 @@
11 diff -uprN bhyve_orig/Makefile bhyve/Makefile
2---- bhyve_orig/Makefile 2020-12-24 09:12:34.000000000 +0900
3-+++ bhyve/Makefile 2020-12-30 21:29:03.796383000 +0900
4-@@ -124,4 +124,6 @@ CFLAGS+=-DGDB_LOG
2+--- bhyve_orig/Makefile 2021-04-09 09:24:13.000000000 +0900
3++++ bhyve/Makefile 2021-05-03 13:23:03.033648000 +0900
4+@@ -131,4 +131,6 @@ CFLAGS+=-DGDB_LOG
55
66 WARNS?= 2
77
@@ -9,34 +9,35 @@ diff -uprN bhyve_orig/Makefile bhyve/Makefile
99 +
1010 .include <bsd.prog.mk>
1111 diff -uprN bhyve_orig/bhyve.8 bhyve/bhyve.8
12---- bhyve_orig/bhyve.8 2020-12-24 09:12:34.000000000 +0900
13-+++ bhyve/bhyve.8 2020-12-30 21:24:17.882128000 +0900
14-@@ -47,6 +47,7 @@
12+--- bhyve_orig/bhyve.8 2021-04-09 09:24:13.000000000 +0900
13++++ bhyve/bhyve.8 2021-05-03 13:30:52.846171000 +0900
14+@@ -46,6 +46,7 @@
15+ .Oc
1516 .Sm on
1617 .Op Fl G Ar port
17- .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-@@ -166,6 +167,13 @@ Print help message and exit.
22+@@ -149,6 +150,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
37---- bhyve_orig/bhyverun.c 2020-12-24 09:12:34.000000000 +0900
38-+++ bhyve/bhyverun.c 2020-12-30 21:26:48.192087000 +0900
39-@@ -189,6 +189,8 @@ const char *vmname;
38+--- bhyve_orig/bhyverun.c 2021-04-09 09:24:13.000000000 +0900
39++++ bhyve/bhyverun.c 2021-05-03 13:29:03.821960000 +0900
40+@@ -188,6 +188,8 @@ const char *vmname;
4041 int guest_ncpus;
4142 uint16_t cores, maxcpus, sockets, threads;
4243
@@ -45,51 +46,51 @@ diff -uprN bhyve_orig/bhyverun.c bhyve/bhyverun.c
4546 char *guest_uuid_str;
4647
4748 int raw_stdio = 0;
48-@@ -239,7 +241,7 @@ usage(int code)
49+@@ -238,7 +240,7 @@ usage(int code)
4950 fprintf(stderr,
50- "Usage: %s [-abehuwxACDHPSWY]\n"
51+ "Usage: %s [-aehuwxACDHPSWY]\n"
5152 " %*s [-c [[cpus=]numcpus][,sockets=n][,cores=n][,threads=n]]\n"
52-- " %*s [-g <gdb port>] [-l <lpc>]\n"
53-+ " %*s [-g <gdb port>] [-k layout] [-l <lpc>]\n"
53+- " %*s [-l <lpc>]\n"
54++ " %*s [-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"
57-@@ -250,6 +252,7 @@ usage(int code)
58- " -g: gdb port\n"
58+@@ -248,6 +250,7 @@ usage(int code)
59+ " -e: exit on unhandled I/O access\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 #ifdef BHYVE_SNAPSHOT
65-@@ -1109,11 +1112,12 @@ main(int argc, char *argv[])
66+@@ -1105,11 +1108,12 @@ main(int argc, char *argv[])
6667 mptgen = 1;
6768 rtc_localtime = 1;
6869 memflags = 0;
6970 + kbdlayout_name = NULL;
7071
7172 #ifdef BHYVE_SNAPSHOT
72-- optstr = "abehuwxACDHIPSWYp:g:G:c:s:m:l:U:r:";
73-+ optstr = "abehuwxACDHIPSWYp:g:G:c:s:m:l:k:U:r:";
73+- optstr = "aehuwxACDHIPSWYp:G:c:s:m:l:U:r:";
74++ optstr = "aehuwxACDHIPSWYp:G:c:s:m:l:K:U:r:";
7475 #else
75-- optstr = "abehuwxACDHIPSWYp:g:G:c:s:m:l:U:";
76-+ optstr = "abehuwxACDHIPSWYp:g:G:c:s:m:l:k:U:";
76+- optstr = "aehuwxACDHIPSWYp:G:c:s:m:l:U:";
77++ optstr = "aehuwxACDHIPSWYp:G:c:s:m:l:K:U:";
7778 #endif
7879 while ((c = getopt(argc, argv, optstr)) != -1) {
7980 switch (c) {
80-@@ -1155,6 +1159,9 @@ main(int argc, char *argv[])
81+@@ -1143,6 +1147,9 @@ main(int argc, char *argv[])
8182 optarg++;
8283 }
8384 gdb_port = atoi(optarg);
8485 + break;
85-+ case 'k':
86++ case 'K':
8687 + kbdlayout_name = optarg;
8788 break;
8889 case 'l':
8990 if (strncmp(optarg, "help", strlen(optarg)) == 0) {
9091 diff -uprN bhyve_orig/bhyverun.h bhyve/bhyverun.h
91---- bhyve_orig/bhyverun.h 2020-12-24 09:12:34.000000000 +0900
92-+++ bhyve/bhyverun.h 2020-12-30 21:24:17.885813000 +0900
92+--- bhyve_orig/bhyverun.h 2021-04-09 09:24:13.000000000 +0900
93++++ bhyve/bhyverun.h 2021-05-03 13:23:03.037115000 +0900
9394 @@ -39,6 +39,7 @@ extern int guest_ncpus;
9495 extern uint16_t cores, sockets, threads;
9596 extern char *guest_uuid_str;
@@ -99,8 +100,8 @@ diff -uprN bhyve_orig/bhyverun.h bhyve/bhyverun.h
99100 void *paddr_guest2host(struct vmctx *ctx, uintptr_t addr, size_t len);
100101 #ifdef BHYVE_SNAPSHOT
101102 diff -uprN bhyve_orig/ps2kbd.c bhyve/ps2kbd.c
102---- bhyve_orig/ps2kbd.c 2020-12-24 09:12:34.000000000 +0900
103-+++ bhyve/ps2kbd.c 2020-12-30 21:24:17.887408000 +0900
103+--- bhyve_orig/ps2kbd.c 2021-04-09 09:24:13.000000000 +0900
104++++ bhyve/ps2kbd.c 2021-05-03 13:23:03.037837000 +0900
104105 @@ -31,6 +31,7 @@
105106 __FBSDID("$FreeBSD$");
106107