From patchwork Tue Sep 8 17:21:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 274248 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MIME_BASE64_TEXT,SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40A9DC433E2 for ; Tue, 8 Sep 2020 17:22:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 97BF22087D for ; Tue, 8 Sep 2020 17:21:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OMYfZ6Pk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 97BF22087D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kFhJe-0006HR-NE for qemu-devel@archiver.kernel.org; Tue, 08 Sep 2020 13:21:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kFhJ3-0005Zk-6m for qemu-devel@nongnu.org; Tue, 08 Sep 2020 13:21:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:45112) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kFhIz-0007cu-U1 for qemu-devel@nongnu.org; Tue, 08 Sep 2020 13:21:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599585676; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gK/VCXtHFB7xDjj0ObOYEF6qXiuSeGaLia0yIE0KiiU=; b=OMYfZ6PkXolGFoGrM6b/bHQXva0pc3XGxiZwOFqAYiUSzw4YvZd3wb21tq5jtt+gI44Sjx NfLw9ZbKhoa2eRiJxrHpERaSDCIa+9I7sWISbGK2rLjfGIoqkpdIPExL5wwRlKYLxC5Gpg AOhrghjxsEWEeAJWZ9aO8h65YzbYnU8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-471-VNPdvCUINk217heYjuBx1A-1; Tue, 08 Sep 2020 13:21:14 -0400 X-MC-Unique: VNPdvCUINk217heYjuBx1A-1 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8A9EC18BE163; Tue, 8 Sep 2020 17:21:13 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-112-122.ams2.redhat.com [10.36.112.122]) by smtp.corp.redhat.com (Postfix) with ESMTP id 989A786589; Tue, 8 Sep 2020 17:21:12 +0000 (UTC) From: Laszlo Ersek To: qemu devel list Subject: [PATCH RESEND] manual: escape backslashes in "parsed-literal" blocks Date: Tue, 8 Sep 2020 19:21:11 +0200 Message-Id: <20200908172111.19072-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lersek@redhat.com X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=216.205.24.124; envelope-from=lersek@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/08 02:10:54 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MIME_BASE64_TEXT=1.741, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" According to , "inline markup is recognized and there is no protection from parsing. Backslash-escapes may be necessary to prevent unintended parsing". The qemu(1) manual page (formatted with Sphinx 2.2.2) has several overlong lines on my system. A stand-alone backslash at EOL serves as line continuation in a "parsed-literal" block. Therefore, escape the backslashes that we want to appear as such in the formatted documentation. Cc: Peter Maydell Signed-off-by: Laszlo Ersek Reviewed-by: Philippe Mathieu-Daudé --- Notes: Resending with Peter's email address in the Cc: tag fixed. Sorry! docs/system/device-url-syntax.rst.inc | 8 +- qemu-options.hx | 108 ++++++++++---------- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/docs/system/device-url-syntax.rst.inc b/docs/system/device-url-syntax.rst.inc index 88d7a372a748..6f6ec8366b7a 100644 --- a/docs/system/device-url-syntax.rst.inc +++ b/docs/system/device-url-syntax.rst.inc @@ -25,8 +25,8 @@ These are specified using a special URL syntax. .. parsed-literal:: - |qemu_system| -iscsi initiator-name=iqn.2001-04.com.example:my-initiator \ - -cdrom iscsi://192.0.2.1/iqn.2001-04.com.example/2 \ + |qemu_system| -iscsi initiator-name=iqn.2001-04.com.example:my-initiator \\ + -cdrom iscsi://192.0.2.1/iqn.2001-04.com.example/2 \\ -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1 Example (CHAP username/password via URL): @@ -39,8 +39,8 @@ These are specified using a special URL syntax. .. parsed-literal:: - LIBISCSI_CHAP_USERNAME="user" \ - LIBISCSI_CHAP_PASSWORD="password" \ + LIBISCSI_CHAP_USERNAME="user" \\ + LIBISCSI_CHAP_PASSWORD="password" \\ |qemu_system| -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1 ``NBD`` diff --git a/qemu-options.hx b/qemu-options.hx index b0f020594eab..47f64be0c041 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -373,9 +373,9 @@ SRST .. parsed-literal:: - |qemu_system| \ - -add-fd fd=3,set=2,opaque="rdwr:/path/to/file" \ - -add-fd fd=4,set=2,opaque="rdonly:/path/to/file" \ + |qemu_system| \\ + -add-fd fd=3,set=2,opaque="rdwr:/path/to/file" \\ + -add-fd fd=4,set=2,opaque="rdonly:/path/to/file" \\ -drive file=/dev/fdset/2,index=0,media=disk ERST @@ -1338,9 +1338,9 @@ SRST .. parsed-literal:: - |qemu_system| \ - -add-fd fd=3,set=2,opaque="rdwr:/path/to/file" \ - -add-fd fd=4,set=2,opaque="rdonly:/path/to/file" \ + |qemu_system| \\ + -add-fd fd=3,set=2,opaque="rdwr:/path/to/file" \\ + -add-fd fd=4,set=2,opaque="rdonly:/path/to/file" \\ -drive file=/dev/fdset/2,index=0,media=disk You can connect a CDROM to the slave of ide0: @@ -2593,7 +2593,7 @@ SRST .. parsed-literal:: - |qemu_system| -hda linux.img -boot n -device e1000,netdev=n1 \ + |qemu_system| -hda linux.img -boot n -device e1000,netdev=n1 \\ -netdev user,id=n1,tftp=/path/to/tftp/files,bootfile=/pxelinux.0 ``smb=dir[,smbserver=addr]`` @@ -2703,15 +2703,15 @@ SRST #launch a QEMU instance with two NICs, each one connected #to a TAP device - |qemu_system| linux.img \ - -netdev tap,id=nd0,ifname=tap0 -device e1000,netdev=nd0 \ + |qemu_system| linux.img \\ + -netdev tap,id=nd0,ifname=tap0 -device e1000,netdev=nd0 \\ -netdev tap,id=nd1,ifname=tap1 -device rtl8139,netdev=nd1 .. parsed-literal:: #launch a QEMU instance with the default network helper to #connect a TAP device to bridge br0 - |qemu_system| linux.img -device virtio-net-pci,netdev=n1 \ + |qemu_system| linux.img -device virtio-net-pci,netdev=n1 \\ -netdev tap,id=n1,"helper=/path/to/qemu-bridge-helper" ``-netdev bridge,id=id[,br=bridge][,helper=helper]`` @@ -2749,12 +2749,12 @@ SRST .. parsed-literal:: # launch a first QEMU instance - |qemu_system| linux.img \ - -device e1000,netdev=n1,mac=52:54:00:12:34:56 \ + |qemu_system| linux.img \\ + -device e1000,netdev=n1,mac=52:54:00:12:34:56 \\ -netdev socket,id=n1,listen=:1234 # connect the network of this instance to the network of the first instance - |qemu_system| linux.img \ - -device e1000,netdev=n2,mac=52:54:00:12:34:57 \ + |qemu_system| linux.img \\ + -device e1000,netdev=n2,mac=52:54:00:12:34:57 \\ -netdev socket,id=n2,connect=127.0.0.1:1234 ``-netdev socket,id=id[,fd=h][,mcast=maddr:port[,localaddr=addr]]`` @@ -2776,16 +2776,16 @@ SRST .. parsed-literal:: # launch one QEMU instance - |qemu_system| linux.img \ - -device e1000,netdev=n1,mac=52:54:00:12:34:56 \ + |qemu_system| linux.img \\ + -device e1000,netdev=n1,mac=52:54:00:12:34:56 \\ -netdev socket,id=n1,mcast=230.0.0.1:1234 # launch another QEMU instance on same "bus" - |qemu_system| linux.img \ - -device e1000,netdev=n2,mac=52:54:00:12:34:57 \ + |qemu_system| linux.img \\ + -device e1000,netdev=n2,mac=52:54:00:12:34:57 \\ -netdev socket,id=n2,mcast=230.0.0.1:1234 # launch yet another QEMU instance on same "bus" - |qemu_system| linux.img \ - -device e1000,netdev=n3,mac=52:54:00:12:34:58 \ + |qemu_system| linux.img \\ + -device e1000,netdev=n3,mac=52:54:00:12:34:58 \\ -netdev socket,id=n3,mcast=230.0.0.1:1234 Example (User Mode Linux compat.): @@ -2793,8 +2793,8 @@ SRST .. parsed-literal:: # launch QEMU instance (note mcast address selected is UML's default) - |qemu_system| linux.img \ - -device e1000,netdev=n1,mac=52:54:00:12:34:56 \ + |qemu_system| linux.img \\ + -device e1000,netdev=n1,mac=52:54:00:12:34:56 \\ -netdev socket,id=n1,mcast=239.192.168.1:1102 # launch UML /path/to/linux ubd0=/path/to/root_fs eth0=mcast @@ -2803,8 +2803,8 @@ SRST .. parsed-literal:: - |qemu_system| linux.img \ - -device e1000,netdev=n1,mac=52:54:00:12:34:56 \ + |qemu_system| linux.img \\ + -device e1000,netdev=n1,mac=52:54:00:12:34:56 \\ -netdev socket,id=n1,mcast=239.192.168.1:1102,localaddr=1.2.3.4 ``-netdev l2tpv3,id=id,src=srcaddr,dst=dstaddr[,srcport=srcport][,dstport=dstport],txsession=txsession[,rxsession=rxsession][,ipv6][,udp][,cookie64][,counter][,pincounter][,txcookie=txcookie][,rxcookie=rxcookie][,offset=offset]`` @@ -2860,9 +2860,9 @@ SRST # Setup tunnel on linux host using raw ip as encapsulation # on 1.2.3.4 - ip l2tp add tunnel remote 4.3.2.1 local 1.2.3.4 tunnel_id 1 peer_tunnel_id 1 \ + ip l2tp add tunnel remote 4.3.2.1 local 1.2.3.4 tunnel_id 1 peer_tunnel_id 1 \\ encap udp udp_sport 16384 udp_dport 16384 - ip l2tp add session tunnel_id 1 name vmtunnel0 session_id \ + ip l2tp add session tunnel_id 1 name vmtunnel0 session_id \\ 0xFFFFFFFF peer_session_id 0xFFFFFFFF ifconfig vmtunnel0 mtu 1500 ifconfig vmtunnel0 up @@ -2872,7 +2872,7 @@ SRST # on 4.3.2.1 # launch QEMU instance - if your network has reorder or is very lossy add ,pincounter - |qemu_system| linux.img -device e1000,netdev=n1 \ + |qemu_system| linux.img -device e1000,netdev=n1 \\ -netdev l2tpv3,id=n1,src=4.2.3.1,dst=1.2.3.4,udp,srcport=16384,dstport=16384,rxsession=0xffffffff,txsession=0xffffffff,counter ``-netdev vde,id=id[,sock=socketpath][,port=n][,group=groupname][,mode=octalmode]`` @@ -4627,8 +4627,8 @@ SRST .. parsed-literal:: - # |qemu_system| \ - -object tls-cipher-suites,id=mysuite0,priority=@SYSTEM \ + # |qemu_system| \\ + -object tls-cipher-suites,id=mysuite0,priority=@SYSTEM \\ -fw_cfg name=etc/edk2/https/ciphers,gen_id=mysuite0 ``-object filter-buffer,id=id,netdev=netdevid,interval=t[,queue=all|rx|tx][,status=on|off][,position=head|tail|id=][,insert=behind|before]`` @@ -4791,10 +4791,10 @@ SRST .. parsed-literal:: - # |qemu_system| \ - [...] \ - -object cryptodev-backend-builtin,id=cryptodev0 \ - -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \ + # |qemu_system| \\ + [...] \\ + -object cryptodev-backend-builtin,id=cryptodev0 \\ + -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \\ [...] ``-object cryptodev-vhost-user,id=id,chardev=chardevid[,queues=queues]`` @@ -4810,11 +4810,11 @@ SRST .. parsed-literal:: - # |qemu_system| \ - [...] \ - -chardev socket,id=chardev0,path=/path/to/socket \ - -object cryptodev-vhost-user,id=cryptodev0,chardev=chardev0 \ - -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \ + # |qemu_system| \\ + [...] \\ + -chardev socket,id=chardev0,path=/path/to/socket \\ + -object cryptodev-vhost-user,id=cryptodev0,chardev=chardev0 \\ + -device virtio-crypto-pci,id=crypto0,cryptodev=cryptodev0 \\ [...] ``-object secret,id=id,data=string,format=raw|base64[,keyid=secretid,iv=string]`` @@ -4892,9 +4892,9 @@ SRST .. parsed-literal:: - # |qemu_system| \ - -object secret,id=secmaster0,format=base64,file=key.b64 \ - -object secret,id=sec0,keyid=secmaster0,format=base64,\ + # |qemu_system| \\ + -object secret,id=secmaster0,format=base64,file=key.b64 \\ + -object secret,id=sec0,keyid=secmaster0,format=base64,\\ data=$SECRET,iv=$(