In scrub_subprocess::__init__(), we construct cmd as an array of strings
to be passed (eventually) to exec. Unfortunately, adding a string to an
array of strings doesn't do what you'd think in Python:
>>> x = ['moo', 'cow']
>>> x += '-x'
>>> x
['moo', 'cow', '-', 'x']
Fix this problem, which Codex has sharp enough eyes to catch.
Cc: linux-xfs@vger.kernel.org # v6.10.0
Fixes: a290edcfa0a391 ("xfs_scrub_all: encapsulate all the subprocess code in an object")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
else:
cmd += '@scrub_args@'.split()
if scrub_media:
- cmd += '-x'
+ cmd += ['-x']
cmd += [mnt]
self.cmdline = cmd
self.proc = None