mkfs: first working version

It can create a basic filesystem of arbitrary size.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
2019-06-09 15:48:07 +08:00
parent ab97abe22a
commit f68f8215b7
5 changed files with 141 additions and 46 deletions

View File

@ -1,9 +1,12 @@
CFLAGS ?= -Iinclude
all: build build/test-get-set-cluster
all: build build/test-get-set-cluster build/test-mkfs-simple
build:
mkdir build
build/test-get-set-cluster:
$(CC) $(CFLAGS) tests/get-set-cluster.c src/fat12.c -o build/test-get-set-cluster
build/test-get-set-cluster: tests/get-set-cluster.c src/fat12.c include/fat12.h
$(CC) $(CFLAGS) tests/get-set-cluster.c src/fat12.c -o build/test-get-set-cluster
build/test-mkfs-simple: tests/mkfs-simple.c src/fat12.c include/fat12.h src/mkfat.c src/io.c
$(CC) $(CFLAGS) tests/mkfs-simple.c src/mkfat.c src/fat12.c src/io.c -o $@