qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org,
	timao@redhat.com
Subject: [PATCH 2/5] docs: Only mention iscsi in the man page when available
Date: Mon, 31 Jan 2022 18:04:08 +0100	[thread overview]
Message-ID: <20220131170411.125198-3-kwolf@redhat.com> (raw)
In-Reply-To: <20220131170411.125198-1-kwolf@redhat.com>

If libiscsi is disabled in the build, the man page shouldn't contain
information on how to construct iscsi URLs etc.

This patch is best viewed with whitespace changes ignored.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 docs/system/device-url-syntax.rst.inc | 60 ++++++++++++++-------------
 qemu-options.hx                       |  9 ++--
 2 files changed, 37 insertions(+), 32 deletions(-)

diff --git a/docs/system/device-url-syntax.rst.inc b/docs/system/device-url-syntax.rst.inc
index 7dbc525fa8..c882bce418 100644
--- a/docs/system/device-url-syntax.rst.inc
+++ b/docs/system/device-url-syntax.rst.inc
@@ -1,47 +1,49 @@
 
 In addition to using normal file images for the emulated storage
-devices, QEMU can also use networked resources such as iSCSI devices.
-These are specified using a special URL syntax.
+devices, QEMU can also use networked resources. These are specified using a
+special URL syntax.
 
-``iSCSI``
-   iSCSI support allows QEMU to access iSCSI resources directly and use
-   as images for the guest storage. Both disk and cdrom images are
-   supported.
+.. only:: not DISABLE_LIBISCSI
 
-   Syntax for specifying iSCSI LUNs is
-   "iscsi://<target-ip>[:<port>]/<target-iqn>/<lun>"
+    ``iSCSI``
+       iSCSI support allows QEMU to access iSCSI resources directly and use
+       as images for the guest storage. Both disk and cdrom images are
+       supported.
 
-   By default qemu will use the iSCSI initiator-name
-   'iqn.2008-11.org.linux-kvm[:<name>]' but this can also be set from
-   the command line or a configuration file.
+       Syntax for specifying iSCSI LUNs is
+       "iscsi://<target-ip>[:<port>]/<target-iqn>/<lun>"
 
-   Since version QEMU 2.4 it is possible to specify a iSCSI request
-   timeout to detect stalled requests and force a reestablishment of the
-   session. The timeout is specified in seconds. The default is 0 which
-   means no timeout. Libiscsi 1.15.0 or greater is required for this
-   feature.
+       By default qemu will use the iSCSI initiator-name
+       'iqn.2008-11.org.linux-kvm[:<name>]' but this can also be set from
+       the command line or a configuration file.
 
-   Example (without authentication):
+       Since version QEMU 2.4 it is possible to specify a iSCSI request
+       timeout to detect stalled requests and force a reestablishment of the
+       session. The timeout is specified in seconds. The default is 0 which
+       means no timeout. Libiscsi 1.15.0 or greater is required for this
+       feature.
 
-   .. parsed-literal::
+       Example (without authentication):
 
-      |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
+       .. parsed-literal::
 
-   Example (CHAP username/password via URL):
+          |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
 
-   .. parsed-literal::
+       Example (CHAP username/password via URL):
 
-      |qemu_system| -drive file=iscsi://user%password@192.0.2.1/iqn.2001-04.com.example/1
+       .. parsed-literal::
 
-   Example (CHAP username/password via environment variables):
+          |qemu_system| -drive file=iscsi://user%password@192.0.2.1/iqn.2001-04.com.example/1
 
-   .. parsed-literal::
+       Example (CHAP username/password via environment variables):
+
+       .. parsed-literal::
 
-      LIBISCSI_CHAP_USERNAME="user" \\
-      LIBISCSI_CHAP_PASSWORD="password" \\
-      |qemu_system| -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
+          LIBISCSI_CHAP_USERNAME="user" \\
+          LIBISCSI_CHAP_PASSWORD="password" \\
+          |qemu_system| -drive file=iscsi://192.0.2.1/iqn.2001-04.com.example/1
 
 ``NBD``
    QEMU supports NBD (Network Block Devices) both using TCP protocol as
diff --git a/qemu-options.hx b/qemu-options.hx
index ba3ae6a42a..4d3721f1ea 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -1363,7 +1363,7 @@ SRST
         If the filename contains comma, you must double it (for instance,
         "file=my,,file" to use file "my,file").
 
-        Special files such as iSCSI devices can be specified using
+        Special files such as for network protocols can be specified using
         protocol specific URLs. See the section for "Device URL Syntax"
         for more information.
 
@@ -1831,8 +1831,11 @@ DEF("iscsi", HAS_ARG, QEMU_OPTION_iscsi,
     "                iSCSI session parameters\n", QEMU_ARCH_ALL)
 
 SRST
-``-iscsi``
-    Configure iSCSI session parameters.
+
+.. only:: not DISABLE_LIBISCSI
+
+    ``-iscsi``
+        Configure iSCSI session parameters.
 ERST
 
 DEFHEADING()
-- 
2.31.1



  parent reply	other threads:[~2022-01-31 17:28 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-31 17:04 [PATCH 0/5] docs: Don't document disabled features Kevin Wolf
2022-01-31 17:04 ` [PATCH 1/5] docs: Pass disabled configure options to sphinx Kevin Wolf
2022-01-31 17:53   ` Daniel P. Berrangé
2022-01-31 17:04 ` Kevin Wolf [this message]
2022-01-31 18:57   ` [PATCH 2/5] docs: Only mention iscsi in the man page when available Peter Maydell
2022-02-01  8:40     ` Kevin Wolf
2022-01-31 17:04 ` [PATCH 3/5] docs: Only mention ssh " Kevin Wolf
2022-01-31 17:04 ` [PATCH 4/5] docs: Only mention curl " Kevin Wolf
2022-01-31 17:04 ` [PATCH 5/5] docs: Only mention gluster " Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220131170411.125198-3-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=timao@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).