From: Mathieu Desnoyers Date: Thu, 29 May 2014 18:52:53 +0000 (-0400) Subject: Fix: statedump block devices OOPS X-Git-Tag: v2.5.0-rc2~5 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5a91f3dfb2ea8b50bfcba45c4440cf20735ea3ee;p=lttng-modules.git Fix: statedump block devices OOPS Fixes #799 Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c index 1bf58ad4..c8ac2d12 100644 --- a/lttng-statedump-impl.c +++ b/lttng-statedump-impl.c @@ -140,6 +140,14 @@ int lttng_enumerate_block_devices(struct lttng_session *session) struct gendisk *disk = dev_to_disk(dev); struct hd_struct *part; + /* + * Don't show empty devices or things that have been + * suppressed + */ + if (get_capacity(disk) == 0 || + (disk->flags & GENHD_FL_SUPPRESS_PARTITION_INFO)) + continue; + disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0); while ((part = disk_part_iter_next(&piter))) { char name_buf[BDEVNAME_SIZE];