Hi, On 23/02/2019 22:56, Kurt Garloff wrote: > if I store device-mapper tables with dmsetup table --concise, I would > expect that dmsetup create --concise would be able to parse the tables. > > dmsetup however fails this with a simple three-entry table like this one Fixing patch is attached. The parser not never get to the third entry ... Best, -- Kurt Garloff <kurt@xxxxxxxxxx> Cologne, Germany
From: Kurt Garloff <kurt@xxxxxxxxxx> Subject: Fix parsing of concise multi-entry tables. The parser would never proceed to the third entry and restart to process from the beginning. The patch fixes this typo. Signed-off-by: Kurt Garloff <kurt@xxxxxxxxxx> --- LVM2.2.02.177/tools/dmsetup.c.orig 2017-12-18 21:44:35.000000000 +0100 +++ LVM2.2.02.177/tools/dmsetup.c 2019-01-10 13:22:07.909638399 +0100 @@ -369,7 +369,7 @@ static int _parse_table_lines(struct dm_ 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;
-- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel