[PATCH 2/2] Convert tgtadm manpage to XML format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch converts the tgtadm manpage to XML format and adds
instruction to build both manpage and webpage for this.

Please apply

Attachment: 0002-Convert-the-tgtadm-manpage-to-XML-format-and-generat.patch.gz
Description: GNU Zip compressed data

From 368902dd689c70eb6a417e71795e01a98566536f Mon Sep 17 00:00:00 2001
From: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
Date: Thu, 18 Feb 2010 17:05:21 +1100
Subject: [PATCH] Convert the tgtadm manpage to XML format and generate it with xsltproc


Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
---
 doc/Makefile                |   10 ++-
 doc/htmlpages/tgtadm.8.html |   36 ++++++
 doc/manpages/tgtadm.8       |  262 +++++++++++++------------------------------
 doc/tgtadm.8.xml            |  143 +++++++++++++++++++++++
 4 files changed, 263 insertions(+), 188 deletions(-)
 create mode 100644 doc/htmlpages/tgtadm.8.html
 create mode 100644 doc/tgtadm.8.xml

diff --git a/doc/Makefile b/doc/Makefile
index 77b6f87..b6051b0 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -8,8 +8,8 @@ DOCS = README.fcoe README.ibmvstgt README.iscsi README.iser \
 	    README.lu_configuration README.mmc tmf.txt
 
 XSLTPROC = /usr/bin/xsltproc
-XMLMAN = manpages/tgtd.8
-XMLHTML = htmlpages/tgtd.8.html
+XMLMAN = manpages/tgtd.8 manpages/tgtadm.8
+XMLHTML = htmlpages/tgtd.8.html htmlpages/tgtadm.8.html
 
 .PHONY:all
 all:
@@ -30,6 +30,12 @@ manpages/tgtd.8: tgtd.8.xml
 htmlpages/tgtd.8.html: tgtd.8.xml
 	-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
 	
+manpages/tgtadm.8: tgtadm.8.xml
+	-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
+
+htmlpages/tgtadm.8.html: tgtadm.8.xml
+	-test -z "$(XSLTPROC)" || $(XSLTPROC) -o $@ http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $<
+	
 xmlman: $(XMLMAN)
 
 xmlhtml: $(XMLHTML)
diff --git a/doc/htmlpages/tgtadm.8.html b/doc/htmlpages/tgtadm.8.html
new file mode 100644
index 0000000..36fb896
--- /dev/null
+++ b/doc/htmlpages/tgtadm.8.html
@@ -0,0 +1,36 @@
+<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>tgtadm</title><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry" lang="en"><a name="tgtadm.8"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>tgtadm &#8212; Linux SCSI Target Administration Utility</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">tgtadm --lld [driver] --op [operation] --mode [mode] [OPTION]...</code> </p></div></div><div class="refsect1" lang="en"><a name="id2475942"></a><h2>DESCRIPTION</h2><p>
+      tgtadm is used to monitor and modify everything about Linux SCSI target
+      software: targets, volumes, etc.
+    </p></div><div class="refsect1" lang="en"><a name="id2475953"></a><h2>OPTIONS</h2><div class="variablelist"><dl><dt><span class="term">--lld [driver] --op new --mode target --tid=[id] --targetname [name]</span></dt><dd><p>
+	    add a new target with [id] and [name].
+          </p></dd><dt><span class="term">--lld [driver] --op delete --mode target --tid=[id]</span></dt><dd><p>
+	    delete specific target with [id]. The target must have no active I_T nexus.
+          </p></dd><dt><span class="term">--lld [driver] --op show --mode target</span></dt><dd><p>
+	    show all the targets.
+          </p></dd><dt><span class="term">--lld [driver] --op show --mode target --tid=[id]</span></dt><dd><p>
+	    show target parameters of a target with [id].
+          </p></dd><dt><span class="term">--lld [driver] --op new --mode=logicalunit --tid=[id] --lun=[lun] --backing-store [path]</span></dt><dd><p>
+	    add a new logical unit with [lun] to specific target with [id]. The
+	    logical unit is offered to the initiators. [path] must be block device
+	    files (including LVM and RAID devices) or regular files. lun0 is
+	    reserved for a special device automatically created.
+          </p></dd><dt><span class="term">--lld [driver] --op delete --mode=logicalunit --tid=[id] --lun=[lun]</span></dt><dd><p>
+	    delete specific logical unit with [lun] that the target with [id] has.
+          </p></dd><dt><span class="term">--lld [driver] --op bind --mode=target --tid=[id] --initiator-address=[address]</span></dt><dd><p>
+	    add the address to the access lists of the target with [id]. Initiators
+	    with the address can access to the target. 'ALL' is a special address
+	    to allow all initiators to access to a target.
+          </p></dd><dt><span class="term">--lld [driver] --op unbind --mode=target --tid=[id] --initiator-address=[address]</span></dt><dd><p>
+	    delete the address from the access lists of the target with [id].
+          </p></dd><dt><span class="term">--lld [driver] --op update --mode=target --tid=[id] --name=[parameter] --value=[value]</span></dt><dd><p>
+	    change the value of [parameter] of the target with [id] to [value].
+          </p></dd><dt><span class="term">--version</span></dt><dd><p>
+	    display version and exit.
+          </p></dd><dt><span class="term">--help</span></dt><dd><p>
+	    display a list of available options and exits.
+          </p></dd></dl></div></div><div class="refsect1" lang="en"><a name="id2476124"></a><h2>SEE ALSO</h2><p>
+      tgtd(8), tgt-admin(8), tgt-setup-lun(8).
+      <a class="ulink" href="http://stgt.sourceforge.net/"; target="_top">http://stgt.sourceforge.net/</a>
+    </p></div><div class="refsect1" lang="en"><a name="id2476138"></a><h2>REPORTING BUGS</h2><p>
+      Report bugs to &lt;stgt@xxxxxxxxxxxxxxx&gt;
+    </p></div></div></body></html>
diff --git a/doc/manpages/tgtadm.8 b/doc/manpages/tgtadm.8
index 33426c8..180b1f9 100644
--- a/doc/manpages/tgtadm.8
+++ b/doc/manpages/tgtadm.8
@@ -1,193 +1,83 @@
-.\" Automatically generated by Pod::Man 2.09 (Pod::Simple 3.04)
+.\"     Title: tgtadm
+.\"    Author: 
+.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
+.\"      Date: 02/18/2010
+.\"    Manual: 
+.\"    Source: 
 .\"
-.\" Standard preamble:
-.\" ========================================================================
-.de Sh \" Subsection heading
-.br
-.if t .Sp
-.ne 5
-.PP
-\fB\\$1\fR
-.PP
-..
-.de Sp \" Vertical space (when we can't use .PP)
-.if t .sp .5v
-.if n .sp
-..
-.de Vb \" Begin verbatim text
-.ft CW
-.nf
-.ne \\$1
-..
-.de Ve \" End verbatim text
-.ft R
-.fi
-..
-.\" Set up some character translations and predefined strings.  \*(-- will
-.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
-.\" double quote, and \*(R" will give a right double quote.  | will give a
-.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
-.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
-.\" expand to `' in nroff, nothing in troff, for use with C<>.
-.tr \(*W-|\(bv\*(Tr
-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
-.ie n \{\
-.    ds -- \(*W-
-.    ds PI pi
-.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
-.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
-.    ds L" ""
-.    ds R" ""
-.    ds C` ""
-.    ds C' ""
-'br\}
-.el\{\
-.    ds -- \|\(em\|
-.    ds PI \(*p
-.    ds L" ``
-.    ds R" ''
-'br\}
-.\"
-.\" If the F register is turned on, we'll generate index entries on stderr for
-.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
-.\" entries marked with X<> in POD.  Of course, you'll have to process the
-.\" output yourself in some meaningful fashion.
-.if \nF \{\
-.    de IX
-.    tm Index:\\$1\t\\n%\t"\\$2"
-..
-.    nr % 0
-.    rr F
-.\}
-.\"
-.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
-.\" way too many mistakes in technical documents.
-.hy 0
-.if n .na
-.\"
-.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
-.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
-.    \" fudge factors for nroff and troff
-.if n \{\
-.    ds #H 0
-.    ds #V .8m
-.    ds #F .3m
-.    ds #[ \f1
-.    ds #] \fP
-.\}
-.if t \{\
-.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
-.    ds #V .6m
-.    ds #F 0
-.    ds #[ \&
-.    ds #] \&
-.\}
-.    \" simple accents for nroff and troff
-.if n \{\
-.    ds ' \&
-.    ds ` \&
-.    ds ^ \&
-.    ds , \&
-.    ds ~ ~
-.    ds /
-.\}
-.if t \{\
-.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
-.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
-.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
-.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
-.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
-.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
-.\}
-.    \" troff and (daisy-wheel) nroff accents
-.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
-.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
-.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
-.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
-.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
-.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
-.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
-.ds ae a\h'-(\w'a'u*4/10)'e
-.ds Ae A\h'-(\w'A'u*4/10)'E
-.    \" corrections for vroff
-.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
-.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
-.    \" for low resolution devices (crt and lpr)
-.if \n(.H>23 .if \n(.V>19 \
-\{\
-.    ds : e
-.    ds 8 ss
-.    ds o a
-.    ds d- d\h'-1'\(ga
-.    ds D- D\h'-1'\(hy
-.    ds th \o'bp'
-.    ds Th \o'LP'
-.    ds ae ae
-.    ds Ae AE
-.\}
-.rm #[ #] #H #V #F C
-.\" ========================================================================
-.\"
-.IX Title "TGTADM 1"
-.TH TGTADM 8 "2007-06-20" "System Management Commands" "System Management Commands"
+.TH "TGTADM" "8" "02/18/2010" "" ""
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
 .SH "NAME"
-tgtadm \- Linux SCSI Target Administration Utility.
+tgtadm - Linux SCSI Target Administration Utility
 .SH "SYNOPSIS"
-.IX Header "SYNOPSIS"
-\&\fBtgtadm \-\-lld [driver] \-\-op [operation] \-\-mode [mode] [OPTION]...\fR
+.HP 65
+\fBtgtadm \-\-lld [driver] \-\-op [operation] \-\-mode [mode] [OPTION]\.\.\.\fR
 .SH "DESCRIPTION"
-.IX Header "DESCRIPTION"
-tgtadm is used to monitor and modify everything about Linux SCSI target software: targets, volumes, etc.
-.SH "OPTIONS"
-.IX Header "OPTIONS"
-\&\fB\-\-lld [driver] \-\-op new \-\-mode target \-\-tid=[id] \-\-targetname [name]\fR
-.PP
-add a new target with [id] and [name].
-.PP
-\&\fB\-\-lld [driver] \-\-op delete \-\-mode target \-\-tid=[id]\fR
-.PP
-delete specific target with [id]. The target must
-have no active I_T nexus.
-.PP
-\&\fB\-\-lld [driver] \-\-op show \-\-mode target\fR
-.PP
-show all the targets.
-.PP
-\&\fB\-\-lld [driver] \-\-op show \-\-mode target \-\-tid=[id]\fR
-.PP
-show target parameters of a target with [id].
 .PP
-\&\fB\-\-lld [driver] \-\-op new \-\-mode=logicalunit \-\-tid=[id] \-\-lun=[lun] \-\-backing-store [path]\fR
-.PP
-add a new logical unit with [lun] to specific
-target with [id]. The logical unit is offered
-to the initiators. [path] must be block device files
-(including \s-1LVM\s0 and \s-1RAID\s0 devices) or regular files. lun0 is reserved for a special device automatically created.
-.PP
-\&\fB\-\-lld [driver] \-\-op delete \-\-mode=logicalunit \-\-tid=[id] \-\-lun=[lun]\fR
-.PP
-delete specific logical unit with [lun] that
-the target with [id] has.
-.PP
-\&\fB\-\-lld [driver] \-\-op bind \-\-mode=target \-\-tid=[id] \-\-initiator-address=[address]\fR
-.PP
-add the address to the access lists of the target with [id]. Initiators with the address can access to the target. 'ALL' is a special address to allow all initiators to access to a target.
-.PP
-\&\fB\-\-lld [driver] \-\-op unbind \-\-mode=target \-\-tid=[id] \-\-initiator-address=[address]\fR
-.PP
-delete the address from the access lists of the target with [id].
-.PP
-\&\fB\-\-lld [driver] \-\-op update \-\-mode=target \-\-tid=[id] \-\-name=[parameter] \-\-value=[value]\fR
-.PP
-change the value of [parameter] of the target with [id] to [value].
-.PP
-\&\fB\-\-version\fR
-.PP
-display version and exit
-.PP
-\&\fB\-\-help\fR
+tgtadm is used to monitor and modify everything about Linux SCSI target software: targets, volumes, etc\.
+.SH "OPTIONS"
 .PP
-display a list of available options and exits
+\-\-lld [driver] \-\-op new \-\-mode target \-\-tid=[id] \-\-targetname [name]
+.RS 4
+add a new target with [id] and [name]\.
+.RE
+.PP
+\-\-lld [driver] \-\-op delete \-\-mode target \-\-tid=[id]
+.RS 4
+delete specific target with [id]\. The target must have no active I_T nexus\.
+.RE
+.PP
+\-\-lld [driver] \-\-op show \-\-mode target
+.RS 4
+show all the targets\.
+.RE
+.PP
+\-\-lld [driver] \-\-op show \-\-mode target \-\-tid=[id]
+.RS 4
+show target parameters of a target with [id]\.
+.RE
+.PP
+\-\-lld [driver] \-\-op new \-\-mode=logicalunit \-\-tid=[id] \-\-lun=[lun] \-\-backing\-store [path]
+.RS 4
+add a new logical unit with [lun] to specific target with [id]\. The logical unit is offered to the initiators\. [path] must be block device files (including LVM and RAID devices) or regular files\. lun0 is reserved for a special device automatically created\.
+.RE
+.PP
+\-\-lld [driver] \-\-op delete \-\-mode=logicalunit \-\-tid=[id] \-\-lun=[lun]
+.RS 4
+delete specific logical unit with [lun] that the target with [id] has\.
+.RE
+.PP
+\-\-lld [driver] \-\-op bind \-\-mode=target \-\-tid=[id] \-\-initiator\-address=[address]
+.RS 4
+add the address to the access lists of the target with [id]\. Initiators with the address can access to the target\. \'ALL\' is a special address to allow all initiators to access to a target\.
+.RE
+.PP
+\-\-lld [driver] \-\-op unbind \-\-mode=target \-\-tid=[id] \-\-initiator\-address=[address]
+.RS 4
+delete the address from the access lists of the target with [id]\.
+.RE
+.PP
+\-\-lld [driver] \-\-op update \-\-mode=target \-\-tid=[id] \-\-name=[parameter] \-\-value=[value]
+.RS 4
+change the value of [parameter] of the target with [id] to [value]\.
+.RE
+.PP
+\-\-version
+.RS 4
+display version and exit\.
+.RE
+.PP
+\-\-help
+.RS 4
+display a list of available options and exits\.
+.RE
+.SH "SEE ALSO"
+.PP
+tgtd(8), tgt\-admin(8), tgt\-setup\-lun(8)\.
+\fI\%http://stgt.sourceforge.net/\fR
 .SH "REPORTING BUGS"
-.IX Header "REPORTING BUGS"
-Report bugs to <stgt@xxxxxxxxxxxxxxx>
+.PP
+Report bugs to <stgt@vger\.kernel\.org>
diff --git a/doc/tgtadm.8.xml b/doc/tgtadm.8.xml
new file mode 100644
index 0000000..550a52d
--- /dev/null
+++ b/doc/tgtadm.8.xml
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<refentry id="tgtadm.8">
+
+<refmeta>
+	<refentrytitle>tgtadm</refentrytitle>
+	<manvolnum>8</manvolnum>
+</refmeta>
+
+
+<refnamediv>
+	<refname>tgtadm</refname>
+	<refpurpose>Linux SCSI Target Administration Utility</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+	<cmdsynopsis>
+		<command>tgtadm --lld [driver] --op [operation] --mode [mode] [OPTION]...</command>
+	</cmdsynopsis>
+	
+</refsynopsisdiv>
+
+  <refsect1><title>DESCRIPTION</title>
+    <para>
+      tgtadm is used to monitor and modify everything about Linux SCSI target
+      software: targets, volumes, etc.
+    </para>
+  </refsect1>
+
+
+  <refsect1>
+    <title>OPTIONS</title>
+
+    <variablelist>
+      <varlistentry><term>--lld [driver] --op new --mode target --tid=[id] --targetname [name]</term>
+        <listitem>
+          <para>
+	    add a new target with [id] and [name].
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--lld [driver] --op delete --mode target --tid=[id]</term>
+        <listitem>
+          <para>
+	    delete specific target with [id]. The target must have no active I_T nexus.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--lld [driver] --op show --mode target</term>
+        <listitem>
+          <para>
+	    show all the targets.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--lld [driver] --op show --mode target --tid=[id]</term>
+        <listitem>
+          <para>
+	    show target parameters of a target with [id].
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--lld [driver] --op new --mode=logicalunit --tid=[id] --lun=[lun] --backing-store [path]</term>
+        <listitem>
+          <para>
+	    add a new logical unit with [lun] to specific target with [id]. The
+	    logical unit is offered to the initiators. [path] must be block device
+	    files (including LVM and RAID devices) or regular files. lun0 is
+	    reserved for a special device automatically created.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--lld [driver] --op delete --mode=logicalunit --tid=[id] --lun=[lun]</term>
+        <listitem>
+          <para>
+	    delete specific logical unit with [lun] that the target with [id] has.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--lld [driver] --op bind --mode=target --tid=[id] --initiator-address=[address]</term>
+        <listitem>
+          <para>
+	    add the address to the access lists of the target with [id]. Initiators
+	    with the address can access to the target. 'ALL' is a special address
+	    to allow all initiators to access to a target.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--lld [driver] --op unbind --mode=target --tid=[id] --initiator-address=[address]</term>
+        <listitem>
+          <para>
+	    delete the address from the access lists of the target with [id].
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--lld [driver] --op update --mode=target --tid=[id] --name=[parameter] --value=[value]</term>
+        <listitem>
+          <para>
+	    change the value of [parameter] of the target with [id] to [value].
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--version</term>
+        <listitem>
+          <para>
+	    display version and exit.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry><term>--help</term>
+        <listitem>
+          <para>
+	    display a list of available options and exits.
+          </para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+  </refsect1>
+
+  <refsect1><title>SEE ALSO</title>
+    <para>
+      tgtd(8), tgt-admin(8), tgt-setup-lun(8).
+      <ulink url="http://stgt.sourceforge.net/"/>
+    </para>
+  </refsect1>
+
+  <refsect1><title>REPORTING BUGS</title>
+    <para>
+      Report bugs to &lt;stgt@xxxxxxxxxxxxxxx&gt;
+    </para>
+  </refsect1>
+
+</refentry>
-- 
1.5.4.3


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux