From nobody Wed Feb 11 07:09:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1493128283005112.76929216421513; Tue, 25 Apr 2017 06:51:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0A4D32BFA6; Tue, 25 Apr 2017 13:51:21 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CBBD386D25; Tue, 25 Apr 2017 13:51:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7969818523D4; Tue, 25 Apr 2017 13:51:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v3PDpECM022573 for ; Tue, 25 Apr 2017 09:51:14 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8021D82464; Tue, 25 Apr 2017 13:51:14 +0000 (UTC) Received: from dhcp-17-113.lcy.redhat.com (unknown [10.42.17.113]) by smtp.corp.redhat.com (Postfix) with ESMTP id E198A82468; Tue, 25 Apr 2017 13:51:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0A4D32BFA6 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0A4D32BFA6 From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Tue, 25 Apr 2017 14:51:08 +0100 Message-Id: <20170425135108.24954-3-berrange@redhat.com> In-Reply-To: <20170425135108.24954-1-berrange@redhat.com> References: <20170425135108.24954-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 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-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 25 Apr 2017 13:51:22 +0000 (UTC) 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 | 41 +++++++++++++++++++++++++++++++++++++++-- tools/virsh.pod | 20 ++++++++++++++++++++ 4 files changed, 62 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 78c3c28..b249224 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1777,6 +1777,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 ebe822d..f68fc1d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -52,6 +52,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 @@ -219,6 +221,36 @@ util/virkeynametable_%.h: $(srcdir)/keycodemapdb/data/= keymaps.csv \ $(srcdir)/keycodemapdb/data/keymaps.csv $$NAME > $@-tmp && \ mv $@-tmp $@ || rm -f $@-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 @@ -227,9 +259,16 @@ KEYTABLES =3D \ $(KEYNAMES:%=3Dutil/virkeynametable_%.h) \ $(NULL) =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) +CLEANFILES +=3D $(KEYMANS) $(KEYPODS) =20 # Internal generic driver infrastructure DATATYPES_SOURCES =3D datatypes.h datatypes.c @@ -2834,8 +2873,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 e16f62f..bba5fed 100644 --- a/tools/virsh.pod +++ b/tools/virsh.pod @@ -2082,11 +2082,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, @@ -2094,22 +2098,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. @@ -2117,17 +2129,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 @@ -2135,6 +2153,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