Skip to content

Commit e76d509

Browse files
committed
fatxfs: Use truncate to create image during test on macOS
1 parent 7606caa commit e76d509

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

fatxfs/test.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ function checksum {
88
mkdir -p c
99

1010
# Format the disk
11-
fallocate -l 8G xbox_hdd.img
12-
fatxfs --format=retail --destroy-all-existing-data xbox_hdd.img c
11+
if [[ "$(uname)" == "Darwin" ]]; then
12+
truncate -s 8g xbox_hdd.img
13+
else
14+
fallocate -l 8G xbox_hdd.img
15+
fi
16+
fatxfs --format=retail --destroy-all-existing-data xbox_hdd.img c
1317
sleep 1
1418

1519
# Copy a file in

0 commit comments

Comments
 (0)