From: Alan Cox Date: Sun, 14 Dec 2014 23:19:29 +0000 (+0000) Subject: mtx512: undo that X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e98051c5cad0e03dfaa63fb70796f6b671c4e2c5;p=FUZIX.git mtx512: undo that Amazing what a floppy bug can look like The disk order is just fine --- diff --git a/Standalone/Makefile b/Standalone/Makefile index 51b375e2..c94072fa 100644 --- a/Standalone/Makefile +++ b/Standalone/Makefile @@ -1,6 +1,6 @@ CC=gcc CCOPTS=-O2 -g -Wall -Wno-char-subscripts -Wno-deprecated-declarations -TARGETS=mkfs fsck ucp raw2mfloppy +TARGETS=mkfs fsck ucp UTILS=util.o devio.o xfs1.o xfs1a.o xfs1b.o xfs2.o all: $(TARGETS) @@ -17,8 +17,5 @@ fsck: fsck.o util.o ucp: ucp.o $(UTILS) $(CC) $(CCOPTS) -o $@ $< $(UTILS) -raw2mfloppy: raw2mfloppy.o - $(CC) $(CCOPTS) -o $@ $< - %.o: %.c $(CC) $(CCOPTS) -c -o $@ $< diff --git a/Standalone/raw2mfloppy.c b/Standalone/raw2mfloppy.c deleted file mode 100644 index d0c31ad9..00000000 --- a/Standalone/raw2mfloppy.c +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Shuffle a disk into the right order - * - * Converts the output of tools like ufs into an MTX512 mfloppy virtual - * disk (or vice versa) - */ -#include -#include -#include -#include -#include - -int main(int argc, char *argv[]) -{ - char buf[8192]; /* 16 sectors */ - int track; - int side; - int in, out; - - if (argc != 3) { - fprintf(stderr, "%s: in out\n", argv[0]); - exit(1); - } - - in = open(argv[1], O_RDONLY); - if (in == -1) { - perror(argv[1]); - exit(1); - } - out = open(argv[2], O_WRONLY|O_CREAT|O_TRUNC, 0666); - if (out == -1) { - perror(argv[2]); - exit(1); - } - - for (side = 0; side < 2; side++) { - for (track = 0; track < 40; track++) { - if (lseek(in, 16384 * track + 8192 * side, 0) == -1) { - perror(argv[1]); - exit(1); - } - if (read(in, buf, 8192) != 8192) { - perror(argv[1]); - exit(1); - } - if (write(out, buf, 8192) != 8192) { - perror(argv[2]); - exit(1); - } - } - } - close(in); - close(out); - exit(0); -}