-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from Gottox/fix/metablock-memleak
metablock_iterator: fix memory leak
- Loading branch information
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/sh -ex | ||
|
||
###################################################################### | ||
# @author : Enno Boland ([email protected]) | ||
# @file : repack.sh | ||
# @created : Friday Mar 17, 2023 15:11:09 CET | ||
# | ||
# @description : This script creates a squashfs image, mounts it, and | ||
# repacks it from the mounted path. | ||
###################################################################### | ||
|
||
: "${BUILD_DIR:?BUILD_DIR is not set}" | ||
: "${MKSQUASHFS:?MKSQUASHFS is not set}" | ||
: "${SOURCE_ROOT:?SOURCE_ROOT is not set}" | ||
: "${SQSH_LS:?SQSH_UNPACK is not set}" | ||
|
||
MKSQUASHFS_OPTS="-no-xattrs -noappend -all-root -mkfs-time 0" | ||
|
||
WORK_DIR="$BUILD_DIR/unpack-repack" | ||
|
||
mkdir -p "$WORK_DIR" | ||
cd "$WORK_DIR" | ||
|
||
mkdir -p "$PWD/empty" | ||
|
||
for i in $(seq 1 3641); do | ||
echo "dir$i d 777 0 0"; | ||
echo "dir$i/file c 776 0 0 100 1"; | ||
done > "$PWD/large_tree.pseudo"; | ||
|
||
# shellcheck disable=SC2086 | ||
$MKSQUASHFS "$PWD/empty" "$PWD/large_tree.squashfs" -pf "$PWD/large_tree.pseudo" \ | ||
$MKSQUASHFS_OPTS | ||
exec $SQSH_LS -r "$PWD/large_tree.squashfs" |