Skip to content

Commit 1e20fbe

Browse files
committed
mounts: skip cursors
Signed-off-by: Stephen Brennan <[email protected]>
1 parent 097775d commit 1e20fbe

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drgn_tools/mounts.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ def get_mountinfo(prog: drgn.Program) -> List[List[str]]:
2323
for mnt in drgn.helpers.linux.fs.for_each_mount(mounts):
2424
devname = mnt.mnt_devname
2525
sb = mnt.mnt.mnt_sb
26+
if not sb:
27+
# See https://github.com/osandov/drgn/pull/496
28+
# TODO: drgn 0.0.32+ can drop this
29+
continue
2630
fstype = sb.s_type.name.string_()
2731
if sb.s_subtype:
2832
fstype += b"." + sb.s_subtype.string_()

0 commit comments

Comments
 (0)