From nobody Tue Feb 10 04:23:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.39 as permitted sender) client-ip=209.132.183.39; envelope-from=libvir-list-bounces@redhat.com; helo=mx6-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.39 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx6-phx2.redhat.com (mx6-phx2.redhat.com [209.132.183.39]) by mx.zohomail.com with SMTPS id 1488560338618588.7551918325403; Fri, 3 Mar 2017 08:58:58 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v23GtbAm030642; Fri, 3 Mar 2017 11:55:37 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v23GsgXu010578 for ; Fri, 3 Mar 2017 11:54:42 -0500 Received: from t460.redhat.com (ovpn-117-177.ams2.redhat.com [10.36.117.177]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v23GsbKA005840; Fri, 3 Mar 2017 11:54:41 -0500 From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Fri, 3 Mar 2017 16:54:35 +0000 Message-Id: <20170303165435.13613-3-berrange@redhat.com> In-Reply-To: <20170303165435.13613-1-berrange@redhat.com> References: <20170303165435.13613-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/2] Add ability to generate man page describing key code names & values X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel P. Berrange --- libvirt.spec.in | 1 + mingw-libvirt.spec.in | 2 ++ src/Makefile.am | 42 +++++++++++++++++++++++++++++++++++++++--- tools/virsh.pod | 20 ++++++++++++++++++++ 4 files changed, 62 insertions(+), 3 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 7f3d18f..374d37f 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1759,6 +1759,7 @@ exit 0 %{_mandir}/man8/libvirtd.8* %{_mandir}/man8/virtlogd.8* %{_mandir}/man8/virtlockd.8* +%{_mandir}/man7/virkey*.7* =20 %doc examples/polkit/*.rules =20 diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in index e088dc2..dec799b 100644 --- a/mingw-libvirt.spec.in +++ b/mingw-libvirt.spec.in @@ -259,6 +259,7 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-gue= sts.sh %{mingw32_mandir}/man1/virt-admin.1* %{mingw32_mandir}/man1/virt-xml-validate.1* %{mingw32_mandir}/man1/virt-pki-validate.1* +%{mingw32_mandir}/man7/virkey*.7* =20 %files -n mingw32-libvirt-static %{mingw32_libdir}/libvirt.a @@ -343,6 +344,7 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_libexecdir}/libvirt-gue= sts.sh %{mingw64_mandir}/man1/virt-admin.1* %{mingw64_mandir}/man1/virt-xml-validate.1* %{mingw64_mandir}/man1/virt-pki-validate.1* +%{mingw64_mandir}/man7/virkey*.7* =20 %files -n mingw64-libvirt-static %{mingw64_libdir}/libvirt.a diff --git a/src/Makefile.am b/src/Makefile.am index 24c1a0e..a2b1b24 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -50,6 +50,8 @@ AM_LDFLAGS =3D $(DRIVER_MODULES_LDFLAGS) \ $(MINGW_EXTRA_LDFLAGS) \ $(NULL) =20 +POD2MAN =3D pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" + EXTRA_DIST =3D $(conf_DATA) =20 BUILT_SOURCES =3D @@ -212,15 +214,51 @@ util/virkeynametable_%.h: $(srcdir)/keycodemapdb/data= /keymaps.csv \ $(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \ $@-tmp && mv $@-tmp $@ || rm $@-tmp =20 +util/virkeycode-%.pod: $(srcdir)/keycodemapdb/data/keymaps.csv \ + $(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am + $(AM_V_GEN)export NAME=3D`echo $@ | sed -e 's,util/virkeycode-,,' \ + -e 's,\.pod,,'` && \ + $(MKDIR_P) util/ && \ + $(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \ + --lang pod --varname "Key code values for $$NAME" code-docs \ + $(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \ + $@-tmp && mv $@-tmp $@ || rm $@-tmp + +util/virkeyname-%.pod: $(srcdir)/keycodemapdb/data/keymaps.csv \ + $(srcdir)/keycodemapdb/tools/keymap-gen Makefile.am + $(AM_V_GEN)export NAME=3D`echo $@ | sed -e 's,util/virkeyname-,,' \ + -e 's,\.pod,,'` && \ + $(MKDIR_P) util/ && \ + $(PYTHON) $(srcdir)/keycodemapdb/tools/keymap-gen \ + --lang pod --varname "Key name values for $$NAME" name-docs \ + $(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > \ + $@-tmp && mv $@-tmp $@ || rm $@-tmp + +util/virkey%.7: util/virkey%.pod + $(AM_V_GEN)$(POD2MAN) --section=3D7 $< $@-t1 && \ + if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \ + sed \ + -e 's|SYSCONFDIR|\@sysconfdir\@|g' \ + -e 's|LOCALSTATEDIR|\@localstatedir\@|g' \ + < $@-t1 > $@-t2 && \ + rm -f $@-t1 && \ + mv $@-t2 $@ + KEYCODES =3D linux osx atset1 atset2 atset3 xt xtkbd usb win32 rfb KEYNAMES =3D linux osx win32 =20 KEYTABLES =3D $(KEYCODES:%=3Dutil/virkeycodetable_%.h) \ $(KEYNAMES:%=3Dutil/virkeynametable_%.h) =20 +KEYPODS =3D $(KEYCODES:%=3Dutil/virkeycode-%.pod) \ + $(KEYNAMES:%=3Dutil/virkeyname-%.pod) +KEYMANS =3D $(KEYPODS:%.pod=3D%.7) + +man7_MANS =3D $(KEYMANS) + UTIL_SOURCES +=3D $(KEYTABLES) BUILT_SOURCES +=3D $(KEYTABLES) -MAINTAINERCLEANFILES +=3D $(KEYTABLES) +MAINTAINERCLEANFILES +=3D $(KEYTABLES) $(KEYMANS) $(KEYPODS) =20 # Internal generic driver infrastructure NODE_INFO_SOURCES =3D nodeinfo.h nodeinfo.c @@ -2797,8 +2835,6 @@ virtlogd.init: logging/virtlogd.init.in $(top_builddi= r)/config.status chmod a+x $@-t && \ mv $@-t $@ =20 -POD2MAN =3D pod2man -c "Virtualization Support" -r "$(PACKAGE)-$(VERSION)" - virtlockd.8.in: locking/virtlockd.pod $(AM_V_GEN)$(POD2MAN) --section=3D8 $< $@-t1 && \ if grep 'POD ERROR' $@-t1; then rm $@-t1; exit 1; fi && \ diff --git a/tools/virsh.pod b/tools/virsh.pod index 6c06ee0..c1a6015 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -2062,11 +2062,15 @@ The numeric values are those defined by the Linux g= eneric input event subsystem. The symbolic names match the corresponding Linux key constant macro names. =20 +See L and L + =3Ditem B =20 The numeric values are those defined by the original XT keyboard controller. No symbolic names are provided =20 +See L + =3Ditem B =20 The numeric values are those defined by the AT keyboard controller, @@ -2074,22 +2078,30 @@ set 1 (aka XT compatible set). Extended keycoes fro= m B may differ from extended keycodes in the B codeset. No symbolic names are provided =20 +See L + =3Ditem B =20 The numeric values are those defined by the AT keyboard controller, set 2. No symbolic names are provided =20 +See L + =3Ditem B =20 The numeric values are those defined by the AT keyboard controller, set 3 (aka PS/2 compatible set). No symbolic names are provided =20 +See L + =3Ditem B =20 The numeric values are those defined by the OS-X keyboard input subsystem. The symbolic names match the corresponding OS-X key constant macro names =20 +See L and L + =3Ditem B =20 The numeric values are those defined by the Linux KBD device. @@ -2097,17 +2109,23 @@ These are a variant on the original XT codeset, but= often with different encoding for extended keycodes. No symbolic names are provided. =20 +See L + =3Ditem B =20 The numeric values are those defined by the Win32 keyboard input subsystem. The symbolic names match the corresponding Win32 key constant macro names =20 +See L and L + =3Ditem B =20 The numeric values are those defined by the USB HID specification for keyboard input. No symbolic names are provided =20 +See L + =3Ditem B =20 The numeric values are those defined by the RFB extension for sending @@ -2115,6 +2133,8 @@ raw keycodes. These are a variant on the XT codeset, = but extended keycodes have the low bit of the second byte set, instead of the high bit of the first byte. No symbolic names are provided. =20 +See L + =3Dback =20 B --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list