All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] report: Print NULL strings as "" in _string_disp (instead of a SEGV).
@ 2014-12-15 22:32 Petr Rockai
  2014-12-15 22:32 ` [PATCH 2/4] report: Add cache_policy and cache_settings (LV) segment fields Petr Rockai
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Petr Rockai @ 2014-12-15 22:32 UTC (permalink / raw)
  To: lvm-devel

---
 lib/report/report.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/report/report.c b/lib/report/report.c
index 5637d50..043de88 100644
--- a/lib/report/report.c
+++ b/lib/report/report.c
@@ -179,6 +179,8 @@ static int _string_disp(struct dm_report *rh, struct dm_pool *mem __attribute__(
 			struct dm_report_field *field,
 			const void *data, void *private __attribute__((unused)))
 {
+	if (!*(void**) data)
+		return _field_set_value(field, "", NULL);
 	return dm_report_field_string(rh, field, (const char * const *) data);
 }
 
-- 
2.1.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-16  9:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-15 22:32 [PATCH 1/4] report: Print NULL strings as "" in _string_disp (instead of a SEGV) Petr Rockai
2014-12-15 22:32 ` [PATCH 2/4] report: Add cache_policy and cache_settings (LV) segment fields Petr Rockai
2014-12-15 22:32 ` [PATCH 3/4] test: Add a test for reports of cache policy & settings Petr Rockai
2014-12-15 22:32 ` [PATCH 4/4] test: Check that cache settings properly survive LV reactivation Petr Rockai
2014-12-16  9:20 ` [PATCH 1/4] report: Print NULL strings as "" in _string_disp (instead of a SEGV) Peter Rajnoha
2014-12-16  9:56   ` Peter Rajnoha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.