aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2012-04-04 13:17:38 +0200
committerKarel Zak <kzak@redhat.com>2012-04-04 13:32:25 +0200
commit8265242b22a672d592025ec66365d32d60429557 (patch)
tree7a9e78e979d70e6b1bdaa781bd9d7faf52edab57
parent4581bd9c6797ea3b753c1d2019a37a84975d749a (diff)
downloadutil-linux-8265242b22a672d592025ec66365d32d60429557.tar.gz
lsblk: count with terminating character, man page -s entry
Signed-off-by: Peter Rajnoha <prajnoha@redhat.com>
-rw-r--r--misc-utils/lsblk.82
-rw-r--r--misc-utils/lsblk.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/misc-utils/lsblk.8 b/misc-utils/lsblk.8
index a5146e499c..a525d2f572 100644
--- a/misc-utils/lsblk.8
+++ b/misc-utils/lsblk.8
@@ -57,6 +57,8 @@ to get a list of all supported columns.
Use key="value" output format. All potentially unsafe characters are hex-escaped (\\x<code>).
.IP "\fB\-r, \-\-raw\fP"
Use the raw output format. All potentially unsafe characters are hex-escaped (\\x<code>).
+.IP "\fB\-s, \-\-inverse\fP"
+Print dependencies in inverse order.
.IP "\fB\-t, \-\-topology\fP"
Output info about block device topology.
This option is equivalent to "-o NAME,ALIGNMENT,MIN-IO,OPT-IO,PHY-SEC,LOG-SEC,ROTA,SCHED,RQ-SIZE".
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index ad773c5982..76356efbbf 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -524,7 +524,7 @@ static char *encode_str(const char *str)
if (!str)
goto err;
- sz = strlen(str) * 4;
+ sz = strlen(str) * 4 + 1;
enc = xmalloc(sz);
if (blkid_encode_string(str, enc, sz) != 0)