diff options
| author | Karel Zak <kzak@redhat.com> | 2012-11-07 14:25:32 +0100 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2012-11-07 14:25:32 +0100 |
| commit | a0e3e3de7b13fabf8db1dac3cd12095933c79c59 (patch) | |
| tree | 62996315f51793478f9b363e77f0502a68728f9d /misc-utils/lsblk.c | |
| parent | 28ffc2b7350bcb6c43b885c660b6250e4207ec72 (diff) | |
| download | util-linux-a0e3e3de7b13fabf8db1dac3cd12095933c79c59.tar.gz | |
lsblk: don't ignore disk device
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/lsblk.c')
| -rw-r--r-- | misc-utils/lsblk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index bca44492e2..ed17839c88 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -1043,12 +1043,12 @@ static int list_partitions(struct blkdev_cxt *wholedisk_cxt, struct blkdev_cxt * * `-<part_cxt> * `-... */ - if (set_cxt(&part_cxt, wholedisk_cxt, wholedisk_cxt, d->d_name)) - goto next; + int ps = set_cxt(&part_cxt, wholedisk_cxt, wholedisk_cxt, d->d_name); + /* Print whole disk only once */ if (r) print_device(wholedisk_cxt, parent_cxt ? parent_cxt->tt_line : NULL); - if (!lsblk->nodeps) + if (ps == 0 && !lsblk->nodeps) process_blkdev(&part_cxt, wholedisk_cxt, 0, NULL); } next: |
