1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Avoid trailing separator in reports when there are hidden sort fields.

This commit is contained in:
Alasdair Kergon 2007-04-27 15:22:27 +00:00
parent b6172b53fd
commit d7ba0e01a5
2 changed files with 10 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.19 -
====================================
Avoid trailing separator in reports when there are hidden sort fields.
Fix segfault in 'dmsetup status' without --showkeys against crypt target.
Deal with some more compiler warnings.
Introduce _add_field() and _is_same_field() to libdm-report.c.

View File

@ -316,7 +316,15 @@ static struct field_properties * _add_field(struct dm_report *rh,
}
fp->flags |= flags;
list_add(&rh->field_props, &fp->list);
/*
* Place hidden fields at the front so list_end() will
* tell us when we've reached the last visible field.
*/
if (fp->flags & FLD_HIDDEN)
list_add_h(&rh->field_props, &fp->list);
else
list_add(&rh->field_props, &fp->list);
return fp;
}