Skip to content

Commit

Permalink
disk: Actually use losetup wrapper
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
cgwalters committed May 2, 2024
1 parent 6bf440b commit 072a497
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/bootc/bootc_disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ const imageMetaXattr = "user.bootc.meta"
// tempLosetupWrapperContents is a workaround for https://github.com/containers/bootc/pull/487/commits/89d34c7dbcb8a1fa161f812c6ba0a8b49ccbe00f
const tempLosetupWrapperContents = `#!/bin/bash
set -euo pipefail
args=()
args=(/usr/sbin/losetup --direct-io=off)
for arg in "$@"; do
case $arg in
--direct-io=*) echo "ignoring: $arg" 1>&2;;
*) args+="$arg" ;;
*) args+=("$arg") ;;
esac
done
exec /usr/sbin/losetup "$@" --direct-io=off
exec "${args[@]}"
`

// DiskImageConfig defines configuration for the
Expand Down

0 comments on commit 072a497

Please sign in to comment.