#include #include #include #include "fakedisc.h" int createdisc(const char *name, int number_of_blocks) { block b; int discnum, x; for (int i=0; i<512; i+=1) b[i]=0; discnum=open(name, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0600); if (discnum<0) { fprintf(stderr, "Create failed for \"%s\"\n", name); return 0; } for (int i=0; i