From dddea713dcc21071bff21631cba3488c5302a67c Mon Sep 17 00:00:00 2001 From: Eric Chan Date: Fri, 9 Feb 2024 15:10:59 +1100 Subject: [PATCH] fix generate storage bug fix generate storage racy bug remove seek option in dd --- examples/virtio/Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/virtio/Makefile b/examples/virtio/Makefile index 6c1aed180..2aa6a059f 100644 --- a/examples/virtio/Makefile +++ b/examples/virtio/Makefile @@ -356,16 +356,16 @@ $(BUILD_DIR)/postmark: $(LINUX_DIR)/postmark.c Makefile $(BUILD_DIR)/storage_0: Makefile dd if=/dev/zero of=$@ bs=1K count=1000 && \ echo -e "g\nn\n1\n50\n\nw" | fdisk $@ && \ - dd if=/dev/zero of=$(BUILD_DIR)/ext4fs bs=1K count=1000 seek=1000 && \ - mkfs.ext4 $(BUILD_DIR)/ext4fs 290 && \ - dd if=$(BUILD_DIR)/ext4fs of=$@ bs=512 seek=50 conv=notrunc + dd if=/dev/zero of=$(BUILD_DIR)/ext4fs bs=1K count=1000 && \ + mkfs.ext4 $(BUILD_DIR)/ext4fs_0 290 && \ + dd if=$(BUILD_DIR)/ext4fs_0 of=$@ bs=512 seek=50 conv=notrunc $(BUILD_DIR)/storage_1: Makefile dd if=/dev/zero of=$@ bs=1K count=1000 && \ echo -e "g\nn\n1\n50\n\nw" | fdisk $@ && \ - dd if=/dev/zero of=$(BUILD_DIR)/ext4fs bs=1K count=1000 seek=1000 && \ - mkfs.ext4 $(BUILD_DIR)/ext4fs 290 && \ - dd if=$(BUILD_DIR)/ext4fs of=$@ bs=512 seek=50 conv=notrunc + dd if=/dev/zero of=$(BUILD_DIR)/ext4fs bs=1K count=1000 && \ + mkfs.ext4 $(BUILD_DIR)/ext4fs_1 290 && \ + dd if=$(BUILD_DIR)/ext4fs_1 of=$@ bs=512 seek=50 conv=notrunc $(BUILD_DIR)/blk_client_init: $(LINUX_DIR)/blk_client_init Makefile cp $< $@