Skip to content

Commit 072a497

Browse files
committed
disk: Actually use losetup wrapper
Chris noticed that the argument passing code didn't work, even though the end effect did work because we were injecting `--direct-io=off`. Signed-off-by: Colin Walters <[email protected]>
1 parent 6bf440b commit 072a497

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/bootc/bootc_disk.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ const imageMetaXattr = "user.bootc.meta"
3838
// tempLosetupWrapperContents is a workaround for https://github.com/containers/bootc/pull/487/commits/89d34c7dbcb8a1fa161f812c6ba0a8b49ccbe00f
3939
const tempLosetupWrapperContents = `#!/bin/bash
4040
set -euo pipefail
41-
args=()
41+
args=(/usr/sbin/losetup --direct-io=off)
4242
for arg in "$@"; do
4343
case $arg in
4444
--direct-io=*) echo "ignoring: $arg" 1>&2;;
45-
*) args+="$arg" ;;
45+
*) args+=("$arg") ;;
4646
esac
4747
done
48-
exec /usr/sbin/losetup "$@" --direct-io=off
48+
exec "${args[@]}"
4949
`
5050

5151
// DiskImageConfig defines configuration for the

0 commit comments

Comments
 (0)