Skip to content

Commit c64c622

Browse files
committed
move config arg to run()
1 parent 0a8f2cd commit c64c622

File tree

1 file changed

+7
-3
lines changed
  • volatility3/framework/plugins/linux

1 file changed

+7
-3
lines changed

volatility3/framework/plugins/linux/lsof.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ def list_fds(
180180
for fd_fields in fd_generator:
181181
yield FDInternal(task=task, fd_fields=fd_fields)
182182

183-
def _generator(self, pids, vmlinux_module_name):
183+
def _generator(self, pids, vmlinux_module_name, include_files_only):
184184
filter_func = pslist.PsList.create_pid_filter(pids)
185-
include_files_only = self.config.get("files_only")
185+
186186
for fd_internal in self.list_fds(
187187
self.context,
188188
vmlinux_module_name,
@@ -195,6 +195,7 @@ def _generator(self, pids, vmlinux_module_name):
195195
def run(self):
196196
pids = self.config.get("pid", None)
197197
vmlinux_module_name = self.config["kernel"]
198+
include_files_only = self.config.get("files_only")
198199

199200
tree_grid_args = [
200201
("PID", int),
@@ -212,7 +213,10 @@ def run(self):
212213
("Size", int),
213214
]
214215
return renderers.TreeGrid(
215-
tree_grid_args, self._generator(pids, vmlinux_module_name)
216+
tree_grid_args,
217+
self._generator(
218+
pids, vmlinux_module_name, include_files_only=include_files_only
219+
),
216220
)
217221

218222
def generate_timeline(self):

0 commit comments

Comments
 (0)