Skip to contentSkip to conversation

qemu-nbd.texi formatting, grammar and completeness fixes

PATCH In review Sitsofe Wheeler 2 participants 9 messages Jan 5, 2016 – Feb 1, 2016

lore
Share & tools
lore
#0 lore raw

v2 cover qemu-nbd.texi formatting, grammar and completeness fixes

Bring the qemu-nbd man page up to date with options and fix some styling and grammar issues along the way.

Changes from v1:
- Add disconnect usage to synopsis.
- Add styling to synopsis usage.
- Fix up the grammar in the description.
- Move filename variable description out of the option table.
- Add a description of the NBD dev variable.
- Add reference to qemu man page to see also section.
- Fix sentence capitalisation in options section.

Sitsofe Wheeler (3):
qemu-nbd: Fix unintended texi verbatim formatting
qemu-nbd: Minor texi updates
qemu-nbd: Fix texi sentence capitalisation

 qemu-nbd.texi | 80 +++++++++++++++++++++++++++++++++--------------------------
 1 file changed, 45 insertions(+), 35 deletions(-)
Signature · 1 line
2.4.3
#1 lore raw

PATCH v2 1/3 qemu-nbd: Fix unintended texi verbatim formatting

Indented lines in the texi meant the perlpod produced interpreted the paragraph as being verbatim (thus formatting codes were not interpreted). Fix this by un-indenting problem lines.

---
 qemu-nbd.texi | 58 +++++++++++++++++++++++++++++-----------------------------
 1 file changed, 29 insertions(+), 29 deletions(-)
qemu-nbd.texi +29 -29
index 46fd483..26cc985 100644
@@ -13,56 +13,56 @@ Export QEMU disk image using NBD protocol.
 @c man begin OPTIONS
 @table @option
 @item @var{filename}
- is a disk image filename
+is a disk image filename
 @item -p, --port=@var{port}
-  port to listen on (default @samp{10809})
+port to listen on (default @samp{10809})
 @item -o, --offset=@var{offset}
-  offset into the image
+offset into the image
 @item -b, --bind=@var{iface}
-  interface to bind to (default @samp{0.0.0.0})
+interface to bind to (default @samp{0.0.0.0})
 @item -k, --socket=@var{path}
-  Use a unix socket with path @var{path}
+Use a unix socket with path @var{path}
 @item -f, --format=@var{format}
-  Set image format as @var{format}
+Set image format as @var{format}
 @item -r, --read-only
-  export read-only
+export read-only
 @item -P, --partition=@var{num}
-  only expose partition @var{num}
+only expose partition @var{num}
 @item -s, --snapshot
-  use @var{filename} as an external snapshot, create a temporary
-  file with backing_file=@var{filename}, redirect the write to
-  the temporary one
+use @var{filename} as an external snapshot, create a temporary
+file with backing_file=@var{filename}, redirect the write to
+the temporary one
 @item -l, --load-snapshot=@var{snapshot_param}
-  load an internal snapshot inside @var{filename} and export it
-  as an read-only device, @var{snapshot_param} format is
-  'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]'
+load an internal snapshot inside @var{filename} and export it
+as an read-only device, @var{snapshot_param} format is
+'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]'
 @item -n, --nocache
 @itemx --cache=@var{cache}
-  set cache mode to be used with the file.  See the documentation of
-  the emulator's @code{-drive cache=...} option for allowed values.
+set cache mode to be used with the file.  See the documentation of
+the emulator's @code{-drive cache=...} option for allowed values.
 @item --aio=@var{aio}
-  choose asynchronous I/O mode between @samp{threads} (the default)
-  and @samp{native} (Linux only).
+choose asynchronous I/O mode between @samp{threads} (the default)
+and @samp{native} (Linux only).
 @item --discard=@var{discard}
-  toggles whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
-  requests are ignored or passed to the filesystem.  The default is no
-  (@samp{--discard=ignore}).
+toggles whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
+requests are ignored or passed to the filesystem.  The default is no
+(@samp{--discard=ignore}).
 @item -c, --connect=@var{dev}
-  connect @var{filename} to NBD device @var{dev}
+connect @var{filename} to NBD device @var{dev}
 @item -d, --disconnect
-  disconnect the specified device
+disconnect the specified device
 @item -e, --shared=@var{num}
-  device can be shared by @var{num} clients (default @samp{1})
+device can be shared by @var{num} clients (default @samp{1})
 @item -f, --format=@var{fmt}
-  force block driver for format @var{fmt} instead of auto-detecting
+force block driver for format @var{fmt} instead of auto-detecting
 @item -t, --persistent
-  don't exit on the last connection
+don't exit on the last connection
 @item -v, --verbose
-  display extra debugging information
+display extra debugging information
 @item -h, --help
-  display this help and exit
+display this help and exit
 @item -V, --version
-  output version information and exit
+output version information and exit
 @end table
 
 @c man end
Signature · 1 line
2.4.3
#2 lore raw

PATCH v2 2/3 qemu-nbd: Minor texi updates

In reply to Sitsofe Wheeler

- Change some spacing.
- Add disconnect usage to synopsis.
- Highlight the command and its options in the synopsis.
- Fix up the grammar in the description.
- Move filename variable description out of the option table.
- Add a description of the dev variable.
- Remove duplicate entry for --format.
- Reword --discard documentation.
- Add --detect-zeroes documentation.
- Add reference to qemu man page to see also section.

---
 qemu-nbd.texi | 34 ++++++++++++++++++++++------------
 1 file changed, 22 insertions(+), 12 deletions(-)
qemu-nbd.texi +22 -12
index 26cc985..5331d69 100644
@@ -1,19 +1,23 @@
 @example
 @c man begin SYNOPSIS
-usage: qemu-nbd [OPTION]...  @var{filename}
+@command{qemu-nbd} [OPTION]... @var{filename}
+
+@command{qemu-nbd} @option{-d} @var{dev}
 @c man end
 @end example
 
 @c man begin DESCRIPTION
 
-Export QEMU disk image using NBD protocol.
+Export a QEMU disk image using the NBD protocol.
 
 @c man end
 
 @c man begin OPTIONS
+@var{filename} is a disk image filename.
+
+@var{dev} is an NBD device.
+
 @table @option
-@item @var{filename}
-is a disk image filename
 @item -p, --port=@var{port}
 port to listen on (default @samp{10809})
 @item -o, --offset=@var{offset}
@@ -22,8 +26,9 @@ offset into the image
 interface to bind to (default @samp{0.0.0.0})
 @item -k, --socket=@var{path}
 Use a unix socket with path @var{path}
-@item -f, --format=@var{format}
-Set image format as @var{format}
+@item -f, --format=@var{fmt}
+force the use of the block driver for format @var{fmt} instead of
+auto-detecting
 @item -r, --read-only
 export read-only
 @item -P, --partition=@var{num}
@@ -44,17 +49,22 @@ the emulator's @code{-drive cache=...} option for allowed values.
 choose asynchronous I/O mode between @samp{threads} (the default)
 and @samp{native} (Linux only).
 @item --discard=@var{discard}
-toggles whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
-requests are ignored or passed to the filesystem.  The default is no
-(@samp{--discard=ignore}).
+controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
+requests are ignored or passed to the filesystem.  @var{discard} is one of
+@samp{ignore} (or @samp{off}), @samp{unmap} (or @samp{on}).  The default is
+@samp{ignore}.
+@item --detect-zeroes=@var{detect-zeroes}
+enables the automatic conversion of plain zero writes by the OS to
+driver-specific optimized zero write commands.  @var{detect-zeroes} is one of
+@samp{off}, @samp{on} or @samp{unmap}.  @samp{unmap}
+converts a zero write to an unmap operation and can only be used if
+@var{discard} is set to @samp{unmap}.  The default is @samp{off}.
 @item -c, --connect=@var{dev}
 connect @var{filename} to NBD device @var{dev}
 @item -d, --disconnect
 disconnect the specified device
 @item -e, --shared=@var{num}
 device can be shared by @var{num} clients (default @samp{1})
-@item -f, --format=@var{fmt}
-force block driver for format @var{fmt} instead of auto-detecting
 @item -t, --persistent
 don't exit on the last connection
 @item -v, --verbose
@@ -79,7 +89,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 @c man end
 
 @c man begin SEEALSO
-qemu-img(1)
+qemu(1), qemu-img(1)
 @c man end
 
 @end ignore
Signature · 1 line
2.4.3
#5 lore raw

PATCH v2 3/3 qemu-nbd: Fix texi sentence capitalisation

In reply to Sitsofe Wheeler

Capitalise the first letter of sentences (and reword for grammar) the options section of qemu-nbd.texi.

---
 qemu-nbd.texi | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)
qemu-nbd.texi +19 -19
index 5331d69..0027841 100644
@@ -19,60 +19,60 @@ Export a QEMU disk image using the NBD protocol.
 
 @table @option
 @item -p, --port=@var{port}
-port to listen on (default @samp{10809})
+The TCP port to listen on (default @samp{10809})
 @item -o, --offset=@var{offset}
-offset into the image
+The offset into the image
 @item -b, --bind=@var{iface}
-interface to bind to (default @samp{0.0.0.0})
+The interface to bind to (default @samp{0.0.0.0})
 @item -k, --socket=@var{path}
 Use a unix socket with path @var{path}
 @item -f, --format=@var{fmt}
-force the use of the block driver for format @var{fmt} instead of
+Force the use of the block driver for format @var{fmt} instead of
 auto-detecting
 @item -r, --read-only
-export read-only
+Export the disk as read-only
 @item -P, --partition=@var{num}
-only expose partition @var{num}
+Only expose partition @var{num}
 @item -s, --snapshot
-use @var{filename} as an external snapshot, create a temporary
+Use @var{filename} as an external snapshot, create a temporary
 file with backing_file=@var{filename}, redirect the write to
 the temporary one
 @item -l, --load-snapshot=@var{snapshot_param}
-load an internal snapshot inside @var{filename} and export it
+Load an internal snapshot inside @var{filename} and export it
 as an read-only device, @var{snapshot_param} format is
 'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]'
 @item -n, --nocache
 @itemx --cache=@var{cache}
-set cache mode to be used with the file.  See the documentation of
+The cache mode to be used with the file.  See the documentation of
 the emulator's @code{-drive cache=...} option for allowed values.
 @item --aio=@var{aio}
-choose asynchronous I/O mode between @samp{threads} (the default)
+Set the asynchronous I/O mode between @samp{threads} (the default)
 and @samp{native} (Linux only).
 @item --discard=@var{discard}
-controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
+Control whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
 requests are ignored or passed to the filesystem.  @var{discard} is one of
 @samp{ignore} (or @samp{off}), @samp{unmap} (or @samp{on}).  The default is
 @samp{ignore}.
 @item --detect-zeroes=@var{detect-zeroes}
-enables the automatic conversion of plain zero writes by the OS to
+Control the automatic conversion of plain zero writes by the OS to
 driver-specific optimized zero write commands.  @var{detect-zeroes} is one of
 @samp{off}, @samp{on} or @samp{unmap}.  @samp{unmap}
 converts a zero write to an unmap operation and can only be used if
 @var{discard} is set to @samp{unmap}.  The default is @samp{off}.
 @item -c, --connect=@var{dev}
-connect @var{filename} to NBD device @var{dev}
+Connect @var{filename} to NBD device @var{dev}
 @item -d, --disconnect
-disconnect the specified device
+Disconnect the device @var{dev}
 @item -e, --shared=@var{num}
-device can be shared by @var{num} clients (default @samp{1})
+Allow up to @var{num} clients to share the device (default @samp{1})
 @item -t, --persistent
-don't exit on the last connection
+Don't exit on the last connection
 @item -v, --verbose
-display extra debugging information
+Display extra debugging information
 @item -h, --help
-display this help and exit
+Display this help and exit
 @item -V, --version
-output version information and exit
+Display version information and exit
 @end table
 
 @c man end
Signature · 1 line
2.4.3
#3 lore raw

Re: [Qemu-devel] [PATCH v2 2/3] qemu-nbd: Minor texi updates

In reply to Sitsofe Wheeler
Quoted 4 lines · Sitsofe Wheeler

@example
@c man begin SYNOPSIS
-usage: qemu-nbd [OPTION]... @var{filename}
+@command{qemu-nbd} [OPTION]... @var{filename}

Could you send another patch that does this change (add @command, remove "usage:") for the other man pages as well?

Paolo

#6 lore raw
In reply to Sitsofe Wheeler
Quoted 12 lines · Sitsofe Wheeler

Bring the qemu-nbd man page up to date with options and fix some styling and grammar issues along the way.

Changes from v1:
- Add disconnect usage to synopsis.
- Add styling to synopsis usage.
- Fix up the grammar in the description.
- Move filename variable description out of the option table.
- Add a description of the NBD dev variable.
- Add reference to qemu man page to see also section.
- Fix sentence capitalisation in options section.

Quoted 8 lines

Sitsofe Wheeler (3):
qemu-nbd: Fix unintended texi verbatim formatting
qemu-nbd: Minor texi updates
qemu-nbd: Fix texi sentence capitalisation

 qemu-nbd.texi | 80 +++++++++++++++++++++++++++++++++--------------------------
 1 file changed, 45 insertions(+), 35 deletions(-)

Thanks, queued. Will send a pull request some time next week.

Paolo

#4 lore raw

Re: [Qemu-devel] [PATCH v2 2/3] qemu-nbd: Minor texi updates

In reply to Paolo Bonzini
Quoted 9 lines · Paolo Bonzini
Quoted 4 lines · Sitsofe Wheeler

@example
@c man begin SYNOPSIS
-usage: qemu-nbd [OPTION]... @var{filename}
+@command{qemu-nbd} [OPTION]... @var{filename}

Could you send another patch that does this change (add @command, remove "usage:") for the other man pages as well?

OK I'll see what I can do.

Signature · 1 line
Sitsofe | http://sucs.org/~sits/
#7 lore raw
In reply to Paolo Bonzini

Hi,

Quoted 19 lines · Paolo Bonzini
Quoted 17 lines · Sitsofe Wheeler

Bring the qemu-nbd man page up to date with options and fix some styling and grammar issues along the way.

Changes from v1:
- Add disconnect usage to synopsis.
- Add styling to synopsis usage.
- Fix up the grammar in the description.
- Move filename variable description out of the option table.
- Add a description of the NBD dev variable.
- Add reference to qemu man page to see also section.
- Fix sentence capitalisation in options section.

Sitsofe Wheeler (3):
qemu-nbd: Fix unintended texi verbatim formatting
qemu-nbd: Minor texi updates
qemu-nbd: Fix texi sentence capitalisation

Quoted 5 lines
Quoted 3 lines
 qemu-nbd.texi | 80 +++++++++++++++++++++++++++++++++--------------------------
 1 file changed, 45 insertions(+), 35 deletions(-)

Thanks, queued. Will send a pull request some time next week.

Just checking - did this one get lost? Nothing's popped up in the QEMU git repos yet...

Signature · 1 line
Sitsofe | http://sucs.org/~sits/
#8 lore raw
Quoted 3 lines · Sitsofe Wheeler
Quoted 1 line
Quoted 1 line

Thanks, queued. Will send a pull request some time next week.

Just checking - did this one get lost? Nothing's popped up in the QEMU git repos yet...

Hmm, yes. Thanks for telling me.

Paolo