Skip to content

Commit

Permalink
Merge branch 'refs/heads/upstream-HEAD' into repo-HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Delphix Engineering committed Feb 28, 2023
2 parents aec7a1b + 1133b2f commit fe9013c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions contrib/lsmod.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
name = mod.name.string_().decode()
size = (mod.init_layout.size + mod.core_layout.size).value_()
if config_module_unload:
refcnt = mod.refcnt.counter.value_()
refcnt = mod.refcnt.counter.value_() - 1
used_by = [
use.source.name.string_().decode()
for use in list_for_each_entry(
Expand All @@ -22,4 +22,8 @@
else:
refcnt = "-"
used_by = []
print(f"{name:19} {size:>8} {refcnt} {','.join(used_by)}")

used = ",".join(used_by)
if used:
used = " " + used
print(f"{name:19} {size:>8} {refcnt}{used}")

0 comments on commit fe9013c

Please sign in to comment.