diff options
author | Alasdair G Kergon <agk@redhat.com> | 2019-02-25 13:41:51 +0000 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2019-02-25 13:41:51 +0000 |
commit | ccfbd505fea2f259f7c89dc23b020b838363a611 (patch) | |
tree | d2a44a4b5baa01d672f5ff6ecc3feb1dfa53b5e9 /libdm/dm-tools | |
parent | eff33684f774bb732e66898a65c52163d0987b70 (diff) | |
download | lvm2-ccfbd505fea2f259f7c89dc23b020b838363a611.tar.gz |
dmsetup: Fix multi-line concise table parsing
Use the correct loop variable within the loop, instead of reusing the
initial value. Table lines after the first don't get terminated in
the right place.
Signed-off-by: Kurt Garloff <kurt@garloff.de>
Diffstat (limited to 'libdm/dm-tools')
-rw-r--r-- | libdm/dm-tools/dmsetup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdm/dm-tools/dmsetup.c b/libdm/dm-tools/dmsetup.c index 2feb4190a..928b59906 100644 --- a/libdm/dm-tools/dmsetup.c +++ b/libdm/dm-tools/dmsetup.c @@ -368,7 +368,7 @@ static int _parse_table_lines(struct dm_task *dmt) do { /* Identify and terminate each line */ - if ((next_pos = strchr(_table, '\n'))) + if ((next_pos = strchr(pos, '\n'))) *next_pos++ = '\0'; if (!_parse_line(dmt, pos, "", ++line)) return_0; |