mtx512: undo that
authorAlan Cox <alan@linux.intel.com>
Sun, 14 Dec 2014 23:19:29 +0000 (23:19 +0000)
committerAlan Cox <alan@linux.intel.com>
Sun, 14 Dec 2014 23:19:29 +0000 (23:19 +0000)
Amazing what a floppy bug can look like

The disk order is just fine

Standalone/Makefile
Standalone/raw2mfloppy.c [deleted file]

index 51b375e..c94072f 100644 (file)
@@ -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 (file)
index d0c31ad..0000000
+++ /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 <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <fcntl.h>
-
-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);
-}