]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsblk: ignore device if disappear while processing
authorMilan Broz <mbroz@redhat.com>
Thu, 21 Jul 2011 20:56:20 +0000 (22:56 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 21 Jul 2011 21:19:52 +0000 (23:19 +0200)
commit270e66eca4a3c5b44d1d86619e36a6e76cede9c8
treedcbe77b7cf3ced4f35d7ae0164619eeb55c3d9a6
parentb59994b0eb9494cb2c8c440b2c685999c722c74c
lsblk: ignore device if disappear while processing

If lsblk runing on system where many devices appears and disappears
during lsblk run, lsblk should not fail or crash but just ignore
disappeared device.

Let's detect context initialization failures and skip device
instead of failing.

Also fix possible dereferencing of NULL parent pointer and
properly handle some error paths.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsblk.c